User Tools

Site Tools


ios:study-note

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
ios:study-note [2012/09/07 20:37] percyios:study-note [2016/05/05 13:07] (current) – external edit 127.0.0.1
Line 26: Line 26:
     NSString *title = [userDefault objectForKey:@"title_preference"];     NSString *title = [userDefault objectForKey:@"title_preference"];
  
 +</code>
 +
 +===== NavigationController =====
 +<code>
 +- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
 +{
 +    self.window = [[[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]] autorelease];
 +    // Override point for customization after application launch.
 +    self.window.backgroundColor = [UIColor whiteColor];
 +      navigationController=[[UINavigationController alloc] init];
 +    RootViewController *rootViewController=[[RootViewController alloc] initWithNibName:@"RootViewController" bundle:nil];
 +    rootViewController.title=@"RootView";
 +    [navigationController pushViewController:rootViewController animated:YES];
 +    
 +    [self.window addSubview:[navigationController view]];
 +    
 +    [self.window makeKeyAndVisible];
 +
 +    [rootViewController release];
 +    
 +    NSUserDefaults *userDefault=[NSUserDefaults standardUserDefaults];
 +    NSString *title = [userDefault objectForKey:@"title_preference"];
 +    if(!title){
 +        [self performSelector:@selector(restoreBundle)];
 +    }
 +    
 +    
 +    return YES;
 +}
 </code> </code>
  
/var/www/dokuwiki/wiki/data/attic/ios/study-note.1347021477.txt.gz · Last modified: 2016/05/05 13:06 (external edit)