自定义UITabBarContorller下面的ta…
2014-01-13 16:13
411 查看
//构建自定义TabBar
- (void)initCustomTabBar{
QFAmountC
*amountC = [QFAmountC new];
QFTradeListC
*tradeListC = [QFTradeListC new];
QFMerchantC
*merchantC = [QFMerchantC new];
QFExpandC
*expandC = [QFExpandC new];
UINavigationController *amountNav = [[[UINavigationController
alloc]initWithRootViewController:amountC]autorelease];
UINavigationController *tradeListNav = [[[UINavigationController
alloc]initWithRootViewController:tradeListC]autorelease];
UINavigationController *merchantNav = [[[UINavigationController
alloc]initWithRootViewController:merchantC]autorelease];
UINavigationController *expandNav = [[[UINavigationController
alloc]initWithRootViewController:expandC]autorelease];
tabBarController.viewControllers = [NSArray
arrayWithObjects:amountNav,tradeListNav,merchantNav,expandNav,nil];
tabBarController.tabBarImagesArray = [NSMutableArray
arrayWithObjects:
[UIImage imageNamed:@"tab_card@2x"],
[UIImage imageNamed:@"tab_trade@2x"],
[UIImage imageNamed:@"tab_Profile@2x"],
[UIImage imageNamed:@"tab_apps@2x"],
- (void)initCustomTabBar{
QFAmountC
*amountC = [QFAmountC new];
QFTradeListC
*tradeListC = [QFTradeListC new];
QFMerchantC
*merchantC = [QFMerchantC new];
QFExpandC
*expandC = [QFExpandC new];
UINavigationController *amountNav = [[[UINavigationController
alloc]initWithRootViewController:amountC]autorelease];
UINavigationController *tradeListNav = [[[UINavigationController
alloc]initWithRootViewController:tradeListC]autorelease];
UINavigationController *merchantNav = [[[UINavigationController
alloc]initWithRootViewController:merchantC]autorelease];
UINavigationController *expandNav = [[[UINavigationController
alloc]initWithRootViewController:expandC]autorelease];
tabBarController.viewControllers = [NSArray
arrayWithObjects:amountNav,tradeListNav,merchantNav,expandNav,nil];
tabBarController.tabBarImagesArray = [NSMutableArray
arrayWithObjects:
[UIImage imageNamed:@"tab_card@2x"],
[UIImage imageNamed:@"tab_trade@2x"],
[UIImage imageNamed:@"tab_Profile@2x"],
[UIImage imageNamed:@"tab_apps@2x"],
相关文章推荐
- 自定义UIPageControl
- UITableView详解
- 关于UINavigationController按钮
- UI常用控件
- UI(2)视图基础
- @GeneratedValue 与 @GenericGenerator
- request.getParameter()与request.getParameterValues()的区别
- UIViewController使用技巧!
- AnalogClock和TimePickerDialog、DatePickerDialog
- 四线八拍步进电机(28BYJ48)Arduino 库stepper
- ios tableView那些事 (十六) UITableView中Cell重用机制导致内容重复解决方法
- 自定义UIBarButtonItem
- 代码手写UI,xib和StoryBoard间的…
- iOS UITextField属性
- Guid.NewGuid()
- LeetCode - Unique Binary Search Trees
- kill -QUIT <pid>
- requestLayout
- jeasyui window 改变高度之后出现阴影
- [leetcode]Permutation Sequence