用segment设置导航栏
来源:互联网 发布:软件打包工具 编辑:程序博客网 时间:2024/05/22 02:23
//设置导航条titleView UISegmentedControl *titleV = [[UISegmentedControl alloc] initWithItems:@[@"充值", @"提现"]]; [titleV setTintColor:[UIColor themecolorWithHexCode]]; titleV.frame = CGRectMake(0, 0, self.view.bounds.size.width * 0.5 - 40, 30); //文字设置 NSMutableDictionary *attDic = [NSMutableDictionary dictionary]; attDic[NSFontAttributeName] = [UIFont fontWithName:@"NotoSansHans-Thin" size:16];; attDic[NSForegroundColorAttributeName] = [UIColor blackColor]; NSMutableDictionary *attDicSelected = [NSMutableDictionary dictionary]; attDicSelected[NSFontAttributeName] = [UIFont fontWithName:@"NotoSansHans-Thin" size:16];; attDicSelected[NSForegroundColorAttributeName] = [UIColor whiteColor]; [titleV setTitleTextAttributes:attDic forState:UIControlStateNormal]; [titleV setTitleTextAttributes:attDicSelected forState:UIControlStateSelected]; //事件 titleV.selectedSegmentIndex = 0; [titleV addTarget:self action:@selector(titleViewChange:) forControlEvents:UIControlEventValueChanged]; self.navigationItem.titleView = titleV;
0 0
- 用segment设置导航栏
- 设置Segment
- 设置导航栏背景
- ios 导航栏设置
- 设置导航栏背景图
- wordpress导航栏设置
- 导航栏相关设置
- 导航栏实用设置
- 导航栏、状态栏设置
- 设置块状导航栏
- 导航栏设置透明
- 设置导航栏
- iOS 导航栏设置
- IOS ---设置导航栏
- 导航栏的设置
- 设置导航栏透明
- iOS导航栏设置
- 设置导航栏透明
- EXE和SYS通信(ReadFile WriteFile DO_BUFFERED_IO) 缓冲区方式
- 封闭的三次贝塞尔曲线的填充
- JVM 优化经验总结
- maya之3d paint tool(3d绘制工具)
- 欢迎使用CSDN-markdown编辑器
- 用segment设置导航栏
- [c]HDOJ1455 dfs的应用
- 一张图告诉你是需要 SQL 还是 Hadoop
- oracle中trim,ltrim,rtrim函数的不同用法
- 杭电 1862 EXCEL排序
- jquery-mobile 学习笔记之二(表单创建)
- curl_easy_setopt-curl详解
- Vuforia开发技巧一-提高Target的识别率(第一部分)
- arduino example------Core Functions 核心功能 (未翻译完)