ios11导航栏按钮不适配解决方法
2017-12-11 15:00
183 查看
UIButton *leftbutton=[[UIButton alloc]initWithFrame:CGRectMake(0, 7, 30, 30)];
UIView *containView = [[UIView alloc] initWithFrame:leftbutton.bounds];
[containView addSubview:leftbutton];
[leftbutton setImage:[UIImage imageNamed:@"but_Photograph_press"] forState:UIControlStateNormal];
UIBarButtonItem *leftItem=[[UIBarButtonItem alloc]initWithCustomView:containView];
self.navigationItem.leftBarButtonItem=leftItem;
UIView *containView = [[UIView alloc] initWithFrame:leftbutton.bounds];
[containView addSubview:leftbutton];
[leftbutton setImage:[UIImage imageNamed:@"but_Photograph_press"] forState:UIControlStateNormal];
UIBarButtonItem *leftItem=[[UIBarButtonItem alloc]initWithCustomView:containView];
self.navigationItem.leftBarButtonItem=leftItem;
相关文章推荐
- iOS11 导航栏按钮位置问题的解决
- iOS11返回按钮和导航栏右按钮的完美适配
- jQueryMobile新版中导航栏按钮消失的解决方法
- jQueryMobile新版中导航栏按钮消失的解决方法
- 关于iOS导航栏返回按钮问题的解决方法
- 第十三篇、Swift_Nav自定义返回按钮后或者隐藏导航栏,Pop返回手势失效的解决方法 Pop全局返回添加的方法
- iOS11项目适配 UIScorllView下移和导航栏返回按钮偏移
- [置顶] iOS11 导航栏按钮位置问题的解决
- ios7以上,导航栏的按钮会出现向中间偏移问题的解决方法
- jQueryMobile新版中导航栏按钮消失的解决方法
- iOS11 完美解决导航栏按钮偏移问题 韩俊强的博客
- [置顶] iOS11 导航栏按钮位置问题的解决------新
- IOS8 点击UIScollView上的按钮时无法滑动的解决方法
- 屏幕适配的解决方法
- 拦截iOS系统导航栏返回按钮事件-三种方法
- iOS开发-iOS11获取定位权限失败的解决方法
- iOS11解决UITableView侧滑删除无限拉伸的方法
- asp.net 点击服务器按钮 不触发后台事件解决方法
- iOS中按钮不响应的解决方法
- Linux下安装ie6对话框的按钮文字是乱码解决方法