标签:
1、/**
iOS7 view的frame: (0,0,320,480)
iOS6 view的frame: (0,0,320,411) 从状态栏下方开始计算坐标
UITabBar高度是49
*/
2、// 第一种方式
CZOneViewController *one = [[CZOneViewController alloc] init];
one.title = @"第一个";
// 设置图像
one.tabBarItem.image = [UIImage imageNamed:@"tab_buddy_nor"];
// 设置数字
one.tabBarItem.badgeValue = @"100";
CZTwoViewController *two = [[CZTwoViewController alloc] init];
two.tabBarItem.image = [UIImage imageNamed:@"tab_me_nor"];
two.title = @"第二个";
// [tab addChildViewController:one];
// [tab addChildViewController:two];
tab.viewControllers = @[one, two];
标签:
原文地址:http://www.cnblogs.com/bluceZ/p/4629385.html