views:

16

answers:

1

How to set class(first class) for UINavigationController from code ?

A: 
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {

     window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
     LoginViewController* loginViewctrl = [[LoginViewController alloc] init];
     navigationController = [[UINavigationController alloc] initWithRootViewController:loginViewctrl];
     UIWindow* window addSubview:[navigationController view]];
     [loginViewctrl release];
     [window makeKeyAndVisible];
}
bioffe