00001
00002
00003
00004
00005
00006
00007
00008
00009 #import "MoodleExampleAppDelegate.h"
00010 #import "RootViewController.h"
00011
00012
00013 @implementation MoodleExampleAppDelegate
00014
00015 @synthesize window;
00016 @synthesize navigationController;
00017 @synthesize moodle;
00018
00019 static MoodleExampleAppDelegate *instance;
00020
00021 #pragma mark -
00022 #pragma mark Application lifecycle
00023
00024 - (void)applicationDidFinishLaunching:(UIApplication *)application {
00025
00026 instance = self;
00027
00028
00029
00030 [window addSubview:[navigationController view]];
00031 [window makeKeyAndVisible];
00032
00033
00034 [[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleBlackOpaque];
00035
00036
00037 moodle = [[Moodle alloc] init];
00038
00039 [moodle login:@"student01" password:@"student01"];
00040 }
00041
00042
00043 - (void)applicationWillTerminate:(UIApplication *)application {
00044
00045 }
00046
00047 + (MoodleExampleAppDelegate*) instance
00048 {
00049 return instance;
00050 }
00051
00052
00053 #pragma mark -
00054 #pragma mark Memory management
00055
00056 - (void)dealloc {
00057 [moodle logout];
00058 [moodle release];
00059 [navigationController release];
00060 [window release];
00061 [super dealloc];
00062 }
00063
00064
00065 @end