- 博客(4)
- 收藏
- 关注
转载 context知识点
0 CGContextRef context = UIGraphicsGetCurrentContext(); 设置上下文1 CGContextMoveToPoint 开始画线2 CGContextAddLineToPoint 画直线4 CGContextAddEllipseInRect 画一椭圆4 CGContextSetLineCap 设置线条终点形状
2016-03-19 16:22:47 311
原创 浅谈block的基本使用和基本认知.
对于block的运用必须了解他存储的区域, 才能更好的利用.block在运用过程中存储状态有3种://1., 静态区,//1. MRC下当声明的block实现部分, 没有引入外界的任何局部变量, 或者引入全局变量或者static变量, 那么该block位于全局静态区, 此时block的内存不需要程序员管理, 程序运行完, 内存被系统回收static int a = 20;
2016-01-22 19:13:10 325
原创 简单分享一下OC中计算文本高度
参数1 width 或 height 指定一个给出参数2 + (CGFloat)calculateHeight:(Joke *)joke { NSDictionary *dictionary = @{NSFontAttributeName:[UIFont systemFontOfSize:17]}; CGRect rect = [joke.content
2016-01-21 18:06:58 1066
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人