设置 项目的ViewController 为UINavigationController的RootController

1.首先在Appdalegate.h 修改如下

@interface AppDelegate : UIResponder <UIApplicationDelegate>
{
    UINavigationController *_navigationController;
}
@property (nonatomic, retain)UINavigationController *navigationController;

2.然后在Appdalegate.m 修改如下

    self.navigationController = [[UINavigationController alloc]initWithRootViewController:self.viewController];
    self.window.rootViewController = self.navigationController;

这样就完成了

posted @ 2012-05-31 23:37  高笑228  阅读(2451)  评论(0编辑  收藏  举报