自定义NavgationBar返回按钮(Swift & OC)
来源:互联网 发布:www.gvlib video.php 编辑:程序博客网 时间:2024/05/16 15:13
Objective-C
UIButton *btn = [UIButton buttonWithType:UIButtonTypeCustom]; btn.frame = CGRectMake(0, 0, 40, 40); self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:btn]; [btn setTitle:@"返回" forState:UIControlStateNormal]; [btn addTarget:self action:@selector(click:) forControlEvents:UIControlEventTouchUpInside];
Swift 版本
func createRightBarButtonItem() { buttonRight = UIButton.init(type: UIButtonType.Custom) buttonRight.frame = CGRectMake(0, 0, 40, 40) self.navigationItem.rightBarButtonItem = UIBarButtonItem(customView: buttonRight) buttonRight.setTitle("Edit", forState: UIControlState.Normal) buttonRight.addTarget(self, action: Selector("jion:"), forControlEvents: UIControlEvents.TouchUpInside) }
3 0
- 自定义NavgationBar返回按钮(Swift & OC)
- 自定义NavgationBar返回按钮
- 自定义NavgationBar返回按钮
- Swift自定义导航栏返回按钮
- swift自定义导航控制器返回按钮事件
- 定制NavgationBar 返回按钮的标题 和图标
- navgationBar按钮颜色
- Swift- 自定义导航栏背景、标题和返回按钮属性
- android 自定义返回按钮
- Android自定义返回按钮
- UINavigation自定义返回按钮
- UINavigationBar自定义返回按钮
- iOS自定义返回按钮
- NavigationController自定义返回按钮
- 自定义返回按钮
- 自定义返回按钮
- UINavigationBar自定义返回按钮
- Navigation返回按钮自定义
- 三位数排列
- Educational Codeforces Round 2 E. Lomsat gelral(启发式合并map)
- java实现斐波那序列
- Hadoop日志
- android中让通知栏和标题栏的颜色一样
- 自定义NavgationBar返回按钮(Swift & OC)
- XMPP框架的分析、导入及问题解决
- 结构体内部的成员是何时分配内存空间的?
- CKEditor图片上传实现(spring mvc)
- 自定义view之雷达扫描
- Android编译系统入门(二)
- 无法识别的配置节 system.serviceModel。
- 一个简单的jsp网页与MySQL链接的简单账户管理网页
- java.lang.NoClassDefFoundError: org/apache/commons/lang3/StringUtils异常