iOS开发 自定义导航栏按钮
来源:互联网 发布:苹果电脑win7换mac 编辑:程序博客网 时间:2024/05/21 09:06
第一种 使用系统提供的方法,具体直接看代码
self.navigationItem.leftBarButtonItem=[[UIBarButtonItemalloc] initWithTitle:@"取消"style:UIBarButtonItemStylePlaintarget:selfaction:@selector(cancleAction)];
//自定义保存按钮
self.navigationItem.rightBarButtonItem=[[UIBarButtonItemalloc] initWithTitle:@"保存"style:UIBarButtonItemStyleDonetarget:selfaction:@selector(submitAction)];
第二种 使用自定义控件的方式
UIButton *btu=[UIButton buttonWithType:UIButtonTypeCustom];
// [btu setTitle:@"取消" forState:UIControlStateNormal];
// [btu setTintColor:[UIColor whiteColor]];
// btu.titleLabel.font=[UIFont systemFontOfSize:15.0];
// [btu addTarget:self action:@selector(cancleAction) forControlEvents:UIControlEventTouchUpInside];
// //自定义返回按钮
// UIBarButtonItem *backBtu=[[UIBarButtonItem alloc] initWithCustomView:btu];
// self.navigationItem.leftBarButtonItems=@[backBtu];
- iOS开发 自定义导航栏按钮
- iOS自定义导航栏的返回按钮
- iOS 自定义导航栏标题和按钮
- iOS 自定义导航栏的返回按钮
- iOS 导航栏自定义返回按钮
- iOS 导航栏返回按钮自定义
- ios开发---自定义导航栏
- ios开发之自定义默认生成的导航栏 标题 颜色 返回按钮
- iOS开发之自定义导航栏返回按钮右滑返回手势失效的解决
- iOS开发之自定义导航栏返回按钮右滑返回手势失效的解决
- iOS开发之自定义导航栏返回按钮右滑返回手势失效的解决
- IOS开发中如何自定义导航栏的按钮,文字和背景图片
- iOS开发之自定义导航栏返回按钮右滑返回手势失效的解决
- iOS开发之自定义导航栏返回按钮右滑返回手势失效的解决
- iOS开发之自定义导航栏返回按钮右滑返回手势失效的解决
- 导航栏自定义按钮
- 自定义导航栏按钮
- IOS 自定义导航栏标题和返回按钮标题
- mongodbVUE使用条件
- OpenWRT添加自启脚本
- json和jsonp的区别
- spring-boot 开启后立即关闭
- PHP团队 编码规范 & 代码样式风格规范
- iOS开发 自定义导航栏按钮
- 对组件的引用(refs)
- J2EE系列之Struts2学习笔记(三)---引入ActionSupport类
- 集成环信即时通讯的Android聊天小程序
- spring 事务管理(转载)
- android 界面状态封装,可快速切换,一个view就可以搞定!
- 第十四单元总结
- JS 時間戳轉日期格式
- 搬砖漫谈