//UITabBar *tab = [[UITabBar alloc] initWithFrame:CGRectZero];
UIView *tabView = [[UIView alloc] initWithFrame:CGRectMake(0, _tabBarVC.view.frame.size.height - 49, _tabBarVC.view.frame.size.width, 49)];
tabView.backgroundColor = [UIColor redColor];
for (int i = 0 ; i< 2; i++) {
UIButton *btn = [UIButton buttonWithType:UIButtonTypeCustom];
btn.frame = CGRectMake(10 + i*150, 10, 60, 20);
btn.tag = i;
[btn setTitle:[NSString stringWithFormat:@"%d",i] forState:UIControlStateNormal];
[btn addTarget:self action:@selector(btnClick:) forControlEvents:UIControlEventTouchUpInside];
[tabView addSubview:btn];
}
[_tabBarVC.view addSubview:tabView];
// [self.navigationController pushViewController:_tabBarVC animated:YES];
iOS UITabBarController 的 UITabBar 自定义
原创mb646b2b3c1359c 博主文章分类:iOS ©著作权
文章标签 i++ ide 文章分类 JavaScript 前端开发
上一篇:Objective-C在ARC下结合GCD的单例模式和宏模版
下一篇:CGBitmapContextCreate unsupported parameter combination 问题详解及解决办法