IOS博客项目搭建-06-自定义TabBar
【推荐阅读】微服务还能火多久?>>> (一)、自定义TabBar 系统默认自带的底部TabBar ①、创建自定义IWTabBar,继承UIView类 创建IWTabBar.m // // IWTabBar.m // ItcastWeibo // // Created by kaiyi on 16-1-27. // Copyright (c) 2016年 kaiyi. All rights reserved. // #import "IWTabBar.h" @implementation IWTabBar - (id)initWithFrame:(CGRect)frame { self = [super initWithFrame:frame]; if (self) { // Initialization code } return self; } -(void)addTabBarButtonWithItem:(UITabBarItem *)item { // 1.创建按钮 UIButton *button = [[UIButton alloc] init]; [self addSubview:button]; // 2.设置数据 [button setTitle:item.title forState:UIControlStateNormal]; [button setImage