AppDelegate .h
@interface AppDelegate : UIResponder <UIApplicationDelegate>
{
UINavigationController *navcontroller;
}
@property (strong, nonatomic) UIWindow *window;
@property (strong, nonatomic) HomeViewController *viewController;
@property (nonatomic,retain)UINavigationController *navcontroller;
AppDelegate.m
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
self.window = [[[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]] autorelease];
// Override point for customization after application launch.
self.viewController = [[[HomeViewController alloc] initWithNibName:@"HomeViewController" bundle:nil] autorelease];
self.navcontroller=[[UINavigationController alloc]initWithRootViewController:viewController];
[self.window addSubview:self.navcontroller.view];
[self.window makeKeyAndVisible];
return YES;
}
No comments:
Post a Comment