User Tools

Site Tools


Sidebar

Programming Reference/Librarys

Question & Answer

Q&A is closed







objective-c:examples:rootviewcontroller
click
to support this page (eg 0,42 € or so) Thanks.

RootViewController

Add a UIViewController named RootViewController to your empty project

Add a RootViewController to your project

First step import the RootViewController.h in your AppDelegate

#import "RootViewController.h"

Second step initialize and add the RootViewController to window

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
    self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
    // Override point for customization after application launch.
 
    /* initialize RootViewController */
    RootViewController *rootVC = [[RootViewController alloc] initWithNibName:@"RootViewController" bundle:nil];
 
    /* Add RootViewController */
    self.window.rootViewController = rootVC;
 
    self.window.backgroundColor = [UIColor whiteColor];
    [self.window makeKeyAndVisible];
    return YES;
}
advertising
objective-c/examples/rootviewcontroller.txt · Last modified: 2012/12/20 12:24 (external edit)

Impressum