下面这个视图(多视图滑动点击切换)在很多App都有用到.使用封装过的view,外部调用一个API就可以实现,十分的方便。
git代码:https://github.com/HelloYeah/HYTabbarView.
//添加一个子控制器
| 代码如下 | 复制代码 |
| -(void)addSubItemWithViewController:(UIViewController *)viewController; | |
1.外部传一个控制器
| 代码如下 | 复制代码 |
| -(void)addSubItemWithViewController:(UIViewController *)viewController{ UIButton*btn=[UIButtonbuttonWithType:UIButtonTypeCustom]; [self.tabbar addSubview:btn]; [self setupBtn:btnwithTitle:viewController.title]; [btn addTarget:self action:@selector(itemSelected:)forControlEvents:UIControlEventTouchUpInside]; [self.subViewControllers addObject:viewController]; } | |
2.KVO监听当前选中View的序号值
| 代码如下 | 复制代码 |
|
NSInteger min = HYColumn / 2 ; | |
韩剧再婚皇后阿里云盘全集高清1080P资源链接-韩剧再婚皇后免费阿里云盘资源下载4K高清无删减版链接
poipiku网站如何打开-poipiku官网网页版访问入口
明日方舟:终末地-云游戏畅玩入口-明日方舟:终末地-网页版在线直连地址
poki在线小游戏网页版-poki免费游戏大全入口
poki游戏入口-点开即玩-poki游戏-在线免费畅玩
原神akt大佬资源viciNeko入口链接-原神akt大佬资源网页vicineko入口链接分享