```
NSString *rateStr = [NSString stringWithFormat:@"七日年化 %.2f%%",info.rate]; [self.rateLabel setText:rateStr afterInheritingLabelAttributesAndConfigu... ...
分类:
其他好文 时间:
2018-08-14 14:25:54
阅读次数:
212
一、属性的get和set方法 1、自定义属性的set和get方法 private(set) var _image:UIImage? //自定义属性get,set var image : UIImage?{ get{ return _image } set(newValue){ _image = ne ...
分类:
编程语言 时间:
2018-08-13 14:58:49
阅读次数:
214
//- (UIView *)createTimeBG //{ // UIView *view = [[UIView alloc]init]; // view.backgroundColor = [UIColor clearColor]; // view.layer.shadowOffset = CG ...
分类:
移动开发 时间:
2018-08-09 21:12:53
阅读次数:
425
一、作用 1.UILabel用于显示文本信息,而UITextField和UITextView用于接收用户输入 2.UITextField只能输入一行,而UITextView能输入多行 二、属性和方法 1.第一响应者(firstResponder) 1??概念:当用户点击一个UITextField、U ...
分类:
其他好文 时间:
2018-08-07 18:54:31
阅读次数:
188
1、自定义非等高 Cell介绍 1.1 代码自定义(frame) 新建一个继承自 UITableViewCell 的类。 重写 initWithStyle:reuseIdentifier: 方法。 添加所有需要显示的子控件(不需要设置子控件的数据和 frame, 子控件要添加到 contentVie ...
分类:
其他好文 时间:
2018-08-05 14:25:52
阅读次数:
134
UIColor、CIColor 和 CGColor 出现在不同的类库里面,其实就是颜色存储方式不同而已,比如 999 可以用 10 进制、2 进制、16 进制等存储。三者之间都是能够方便转换的,特别是很多构造函数。 1、UIColor 的创建 1.1 使用系统定义好的颜色创建 1.2 由白色透明度创 ...
分类:
其他好文 时间:
2018-08-04 00:05:52
阅读次数:
247
Swift Updated for Swift 3 Use with a textView.linkTextAttributes = [NSForegroundColorAttributeName: UIColor.green] And in context: let attributedStrin ...
分类:
其他好文 时间:
2018-08-01 18:25:12
阅读次数:
156
http://aaronzjp.cn/2016/12/01/iOS CALayer/ 这个属性和android 的 .9 文件类似,定义了图片的拉伸范围:例子中明显是四个角不拉伸,对于需要做背景,contentsCenter矩形范围为横竖拉伸的交叉区域 ![此处输入图片的描述][1] _layerV ...
分类:
其他好文 时间:
2018-07-20 21:14:07
阅读次数:
995
[UINavigationBar appearance].backIndicatorTransitionMaskImage = [UIImage imageNamed:@"backArrowMask.png"]; [UINavigationBar appearance].backIndicatorI ...
分类:
移动开发 时间:
2018-07-16 14:05:21
阅读次数:
184