首页 > 移动平台 > 详细

IOS 开发didFinishLaunchingWithOptions 设置启动View

时间:2015-11-03 17:15:49      阅读:2577      评论:0      收藏:0      [点我收藏+]

 

1.单View

self.window= [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
self.window.backgroundColor=[UIColor grayColor];

IOS01ButtonViewController *ios01MyButton=[[IOS01ButtonViewController alloc]init];

self.window.rootViewController=ios01MyButton;

[self.window makeKeyAndVisible];

 

 

2.导航

self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
self.window.backgroundColor = [UIColor whiteColor];


NavigationBarViewController *root=[[NavigationBarViewController alloc]init];

NavigationViewController *nav = [[NavigationViewController alloc]initWithRootViewController:root];
self.window.rootViewController=nav;

/*UITabBarViewController
*navigation=[[UITabBarViewController alloc]init];

self.window.rootViewController =navigation;

ButtonViewController *button1=[[ButtonViewController alloc]init];
button1.tabBarItem.title=@"Messgae";
button1.tabBarItem.badgeValue=@"99+";

TooBarViewController *button2=[[TooBarViewController alloc]init];
button2.tabBarItem.title=@"Messgae";
button2.tabBarItem.badgeValue=@"99+";
button2.view.backgroundColor=[UIColor blueColor];

//[navigation addChildViewController:button1];
//[navigation addChildViewController:button2];

navigation.viewControllers=@[button1,button2 ];

[self.window makeKeyAndVisible];

IOS 开发didFinishLaunchingWithOptions 设置启动View

原文:http://www.cnblogs.com/zhangleixy/p/4933526.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!