iOS-系统tabbar加选中条
来源:互联网 发布:java json post请求 编辑:程序博客网 时间:2024/05/21 06:34
-(void)viewDidAppear:(BOOL)animated{
[superviewDidAppear:animated];
UITabBar *tab =self.view.subviews[1];
tab.layer.borderColor = [UIColorwhiteColor].CGColor;
UIView *wapperView = tab.subviews[0];
wapperView.frame =CGRectMake(0,2,CGRectGetWidth(self.view.frame),48);
UIView *v = [[UIViewalloc] initWithFrame:CGRectMake(0,0, CGRectGetWidth(self.view.frame)/4,2)];
_slideView = v;
v.backgroundColor =kGlobalColor;
[tabaddSubview:v];
for (UIView *vin tab.subviews) {
if ([v isMemberOfClass:[UIImageViewclass]]) {
//memberofclass是判断实例是否是给到的类实例化而来的对象,iskindofclass 是判断当前类是否是给到的类或者是它的子类实例化而来的
[v removeFromSuperview];
break;
}
}
}
-(void)tabBarController:(UITabBarController *)tabBarController didSelectViewController:(UIViewController *)viewController{
[UIViewanimateWithDuration:.35animations:^{
_slideView.frame =CGRectMake(CGRectGetWidth(_slideView.frame) *self.selectedIndex,CGRectGetMinY(_slideView.frame),CGRectGetWidth(_slideView.frame),CGRectGetHeight(_slideView.frame));
}];
}
{
__weak UIView *_slideView;
}
- iOS-系统tabbar加选中条
- 为菜单条加选中标记
- jquery加选中样式
- iOS创建系统TabBar
- ios中自定义tabBar
- ios中自定义tabBar
- [iOS]系统TabBar简单使用
- iOS状态栏 导航条 tabbar高度
- iOS中tabbar标题设置和导航条标题冲突的问题
- iOS开发中 自定义TabBar
- iOS中关于自定义Tabbar
- iOS将系统tabbar设置为透明
- iOS 删除系统自带的tabbar
- iOS隐藏导航条、tabbar 1px的底部横线
- IOS中同时使用TabBar和Navigation
- IOS TabBar小知识(不断更新中。。。)
- iOS中跳转控制器隐藏底部tabBar
- tabbar 在iOS 11中隐藏问题
- Neural Networks for Machine Learning by Geoffrey Hinton (6)
- netty4发送HttpRequest及HttpReponse太大的问题(半包)
- Jquery Mobile 开发问题
- dnf包管理器(简介)
- python __init__和__new__之间的区别
- iOS-系统tabbar加选中条
- 东方财富上半年净利同比大增30倍
- java初学者学习教程——01 java基本概念
- 黑马程序员——List接口
- Intel 82599 ixgbe & ixgbevf CNA 卡驱动分析02——VF/PF/MailBox
- 杭电1242-Rescue(bfs+优先队列||队列)
- Mybatis + SpringMVC事务管理
- codeblocks 设置代码自动补全
- 在Linux Bash通过上下键快速查找历史命令