pushviewctroller nil

来源:互联网 发布:ubuntu的password 编辑:程序博客网 时间:2024/05/29 09:27

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

{

    self.window = [[[UIWindowalloc] initWithFrame:[[UIScreenmainScreen] bounds]] autorelease];

    // Override point for customization after application launch.

UIViewController *vc = [[[HFViewControlleralloc] initWithNibName:@"HFViewController"bundle:nil]autorelease];

// self.window.rootViewController = self.viewController;

UINavigationController *nav = [[[UINavigationControlleralloc] initWithRootViewController:vc]autorelease];

[nav setNavigationBarHidden:YESanimated:YES];

// self.viewController = nav;

self.window.rootViewController =nav;

[self.windowaddSubview:nav.view];

    [self.windowmakeKeyAndVisible];

    returnYES;

}

原创粉丝点击