标签:cat option list turn selected 基础 single 模版 一个
xcode中给我内置很多app模版,不过很多时候我们需要更加灵活的初始化项目。下面我就简单介绍一下,如何从0开始制作一个tabbar app。
‘‘‘
-(BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
WordListVC * oneVC=[[WordListVC alloc] init];
WordListVC * twoVC=[[WordListVC alloc] init];
WordListVC * threeVC=[[WordListVC alloc] init];
oneVC.tabBarItem.title = @今日计划
;
oneVC.tabBarItem.image = [UIImage imageNamed:@plan-icon
];
twoVC.tabBarItem.title = @词汇列表
;
twoVC.tabBarItem.image = [UIImage imageNamed:@list-icon
];
//self.placeholderVC.tabBarItem.title = @";
生疏词汇
threeVC.tabBarItem.title = @;
unfamiliar-words-icon
threeVC.tabBarItem.image = [UIImage imageNamed:@];
设置
//pvc.tabBarItem.title = @;
settings-icon"];
//pvc.tabBarItem.image = [UIImage imageNamed:@
UITabBarController *tabbarController = [[UITabBarController alloc]init];
tabbarController.delegate = self;
[tabbarController setViewControllers:@[oneVC,twoVC,threeVC]];
[tabbarController setSelectedIndex:0];
tabbarController.tabBar.barTintColor = [UIColor whiteColor];
self.tabbarController = tabbarController;
self.window.rootViewController=self.tabbarController;
return YES;
}
‘‘‘
标签:cat option list turn selected 基础 single 模版 一个
原文地址:http://www.cnblogs.com/springday/p/7439665.html