ios 技巧2- 读书笔记
来源:互联网 发布:启用视频网络 编辑:程序博客网 时间:2024/06/05 03:48
NSDictionary *textDic = [NSDictionary dictionaryWithObjectsAndKeys:
[[UIColor blackColor] colorWithAlphaComponent:0.6f],UITextAttributeTextColor,[UIColor blackColor],UITextAttributeTextShadowColor,
[NSValue valueWithUIOffset:UIOffsetMake(1, 0)],UITextAttributeTextShadowOffset,
[UIFont systemFontOfSize:13],UITextAttributeFont,nil];
NSDictionary *highTextDic = [NSDictionary dictionaryWithObjectsAndKeys:
[[UIColor whiteColor] colorWithAlphaComponent:1.0f],UITextAttributeTextColor,
[UIColor whiteColor],UITextAttributeTextShadowColor,
[NSValue valueWithUIOffset:UIOffsetMake(1, 0)],UITextAttributeTextShadowOffset,
[UIFont systemFontOfSize:13],UITextAttributeFont,nil];
[self.Navbtnitem_segment setTitleTextAttributes:textDic forState:UIControlStateNormal];
[self.Navbtnitem_segment setTitleTextAttributes:highTextDic forState:UIControlStateSelected];
self.navigationController.view.backgroundColor = [UIColor clearColor];
if ([[[UIDevice currentDevice] systemVersion] floatValue] >=7.0) {
self.navigationController.navigationBar.translucent = YES; //禁止半透明毛玻璃效果
self.navigationController.navigationBar.tintColor = [UIColor whiteColor]; //返回按钮颜色
self.navigationController.navigationBar.barTintColor = [UIColor clearColor]; //bar背景颜色
[self.navigationController.navigationBar setBackgroundColor:[UIColor clearColor]];
self.navigationController.navigationBar.titleTextAttributes = @{NSForegroundColorAttributeName:[UIColor whiteColor],NSFontAttributeName:[UIFont boldSystemFontOfSize:18]}; //标题颜色
self.navigationController.navigationBar.barStyle = UIBarStyleBlackTranslucent;
}else{
[self.navigationController.navigationBar setTintColor:[UIColor clearColor]]; //bar背景颜色
self.navigationController.navigationBar.translucent = NO;
self.navigationController.navigationBar.titleTextAttributes = @{NSForegroundColorAttributeName:[UIColor whiteColor],NSFontAttributeName:[UIFont boldSystemFontOfSize:18]};
self.navigationController.navigationBar.barStyle = UIBarStyleDefault;
}
给label添加分割线
NSUInteger length = [oldPrice length];
NSMutableAttributedString *attri = [[NSMutableAttributedString alloc] initWithString:oldPrice];
[attri addAttribute:NSStrikethroughStyleAttributeName value:@(NSUnderlinePatternSolid | NSUnderlineStyleSingle) range:NSMakeRange(0, length)];
[attri addAttribute:NSStrikethroughColorAttributeName value:[UIColor lightGrayColor] range:NSMakeRange(0, length)];
[labelAnswer setAttributedText:attri];
- ios 技巧2- 读书笔记
- 【读书笔记】iOS-开发技巧-UILabel内容模糊的原因
- 【读书笔记】iOS-开发技巧-三种收起键盘的方法
- windows游戏编程大师技巧--读书笔记2
- <<More Effective C++>>读书笔记5: 技巧(2)
- iOS 开发技巧2
- IOS读书笔记
- ios读书笔记
- iOS 读书笔记
- 【读书笔记】iOS-iOS定位
- IOS开发指南读书笔记8(AutoLayout) 2
- iOS基础开发技巧2
- JavaScript模式读书笔记 第2章 基本技巧
- iOS 技巧
- ios技巧
- iOS技巧
- More Effective C++读书笔记---技巧
- 读书笔记--博赞学习技巧
- 英语听力达人训练营
- 关于fflush(stdin)清空输入缓存流(C/C++)
- leetcode笔记:Convert Sorted List to Binary Search Tree
- 关于在国内使用maven的一些设置
- 关于ios 读书笔记
- ios 技巧2- 读书笔记
- AFNetwork 作用和用法详解
- Win10+VS2015折腾小记
- 设计模式系列14---管流程不管细节的模板方法模式
- IOS学习日志(Controller)1.7
- 收藏的链接
- 利用ajax向控制器中传二维数组
- Java面试题集(1-50)
- Java面试题集(51-70)