-1
任何人都可以解释我一步一步的过程转换基于视图的应用程序导航为基础的应用程序吗?这是在IB和我的appdelegate采取的步骤来实现这一目标?如何将我的基于视图的应用程序转换为基于导航的应用程序?
任何人都可以解释我一步一步的过程转换基于视图的应用程序导航为基础的应用程序吗?这是在IB和我的appdelegate采取的步骤来实现这一目标?如何将我的基于视图的应用程序转换为基于导航的应用程序?
在你的应用程序代理,你可以把你的代码是这样的:
self.viewController = [[[ViewController alloc] initWithNibName:@"ViewController" bundle:nil] autorelease];
UINavigationController *navigationController = [[UINavigationController alloc] initWithRootViewController:self.viewController];
[self.window addSubview:navigationController.view];
在界面添加UInavigation控制器对象file.and然后在didfinishlaunch
self.navigationController = [[UINavigationController alloc] initWithRootViewController:viewController];
[self.navigationController setNavigationBarHidden:NO];
//self.navigationController.navigationBar.barStyle = UIBarStyleBlackTranslucent;
//self.navigationController.navigationBar.translucent = YES;
// Override point for customization after app launch
[window addSubview:self.navigationController.view];
[window makeKeyAndVisible];
返回的代码添加YES ;
并且不要忘记将代理连接到IB中的文件所有者。