iOS 开发之 - iOS6适配 - 导航栏按钮透明方法
生活随笔
收集整理的这篇文章主要介绍了
iOS 开发之 - iOS6适配 - 导航栏按钮透明方法
小编觉得挺不错的,现在分享给大家,帮大家做个参考.
首先上张图:
1:ios6导航栏默认按钮
rightBarButtonItem
是不是很丑的赶脚?
现在通过以下方法来改变以下;code:
UIButton *rightButton = [UIButton buttonWithType:UIButtonTypeCustom];rightButton.frame = CGRectMake(0, 0, 40, 40);[rightButton setTitle:@"提交" forState:UIControlStateNormal];[rightButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];[rightButton addTarget:self action:@selector(buttonClick) forControlEvents:UIControlEventTouchUpInside];self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:rightButton];
如图:
ok.好看多了。
转载于:https://www.cnblogs.com/SomnusLove/p/3916209.html
总结
以上是生活随笔为你收集整理的iOS 开发之 - iOS6适配 - 导航栏按钮透明方法的全部内容,希望文章能够帮你解决所遇到的问题。
- 上一篇: PL/SQL NOCOPY限制模式
- 下一篇: iOS之github第三方框架(持续更新