自定义导航栏
来源:互联网 发布:js 弹出提示框 编辑:程序博客网 时间:2024/05/18 02:00
自定义右侧按钮
UIButton * rightBtn = [UIButtonbuttonWithType:UIButtonTypeRoundedRect];
rightBtn.frame =CGRectMake(0,0, 40,40);
rightBtn.backgroundColor = [UIColororangeColor];
[rightBtn addTarget:selfaction:@selector(rightButtonClick)forControlEvents:UIControlEventTouchUpInside];
UIBarButtonItem * rightItem = [[UIBarButtonItemalloc] initWithCustomView:rightBtn];
self.navigationItem.rightBarButtonItem = rightItem
自定义中间视图
UIView * centerView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 100, 30)];centerView.backgroundColor = [UIColor clearColor];self.navigationItem.titleView = centerView;
1 0
- UINavigationBar自定义导航栏
- 导航栏自定义按钮
- 自定义导航栏
- 自定义导航栏UINavigationBar
- 自定义导航栏
- 自定义导航栏按钮
- 自定义添加导航栏
- iOS自定义导航栏
- iOS自定义导航栏
- 导航栏自定义控件
- 代码自定义导航栏
- 自定义导航栏(Base)
- 自定义顶部导航栏
- 自定义导航栏
- 自定义导航栏
- 自定义导航栏
- android自定义导航栏
- iOS 自定义导航栏
- Spring 定时任务
- 使用JDK开发WebService
- echarts饼图自动显示数据
- Spark中加载本地(或者hdfs)文件以及SparkContext实例的textFile使用
- Android ViewFinder
- 自定义导航栏
- double free 内存问题
- 给webView添加头视图
- 深入理解Java:注解(Annotation)--注解处理器
- 各种设备的CSS3MediaQuery整理及爽歪歪写法
- 嵌入式Linux基础知识
- Spark 中 map 与 flatMap 的区别
- CentOS7.X 快速装机与便捷使用
- 华为机试---二维数组打印