UINavigationController、UIViewController 落日映苍穹つ 2022-08-26 01:16 174阅读 0赞 RootViewController *viewController; UINavigationController *navController; @property (nonatomic, retain) RootViewController *viewController; @property (nonatomic, retain) UINavigationController *navController; @synthesize viewController; @synthesize navController; RootViewController *controller = [[RootViewController alloc] initWithNibName:@"RootViewController" bundle:nil]; UINavigationController *navController = [[UINavigationController alloc] initWithRootViewController:controller]; //UINavigationController *navController = [[UINavigationController alloc] initWithRootViewController:self]; //navController.navigationBar.barStyle = UIBarStyleBlack; // navController.navigationBarHidden = YES; [navController.navigationBar setHidden:YES]; navController.navigationBar.translucent = NO; window = [[UIWindow alloc] initWithFrame: [[UIScreen mainScreen] bounds]]; EAGLView *__glView = [EAGLView viewWithFrame: [window bounds] pixelFormat: kEAGLColorFormatRGBA8 depthFormat: GL_DEPTH_COMPONENT16 preserveBackbuffer: NO sharegroup: nil multiSampling: NO numberOfSamples:0 ]; navController = navController;//[[RootViewController alloc] initWithNibName:nil bundle:nil]; navController.wantsFullScreenLayout = YES; // Set RootViewController to window if ( [[UIDevice currentDevice].systemVersion floatValue] < 6.0) { // warning: addSubView doesn't work on iOS6 [window addSubview: navController.view]; } else { // use this method on ios6 [window setRootViewController:navController]; } [window makeKeyAndVisible]; [UIApplication sharedApplication] setStatusBarHidden: YES]; cocos2d::CCApplication::sharedApplication()->run();
还没有评论,来说两句吧...