摘要:
1 // 画圆弧 2 // 1.获取上下文 3 CGContextRef ctx = UIGraphicsGetCurrentContext(); 4 // 2.画圆弧 5 // x/y 圆心 6 // radius 半径 7 // start... 阅读全文
摘要:
1 - (void)drawRect:(CGRect)rect 2 { 3 4 // 1.获取上下文 5 CGContextRef ctx = UIGraphicsGetCurrentContext(); 6 // 画圆 7 CGContextAddArc(ctx... 阅读全文
摘要:
1 // 1.获取图形上下文 2 CGContextRef ctx = UIGraphicsGetCurrentContext(); 3 4 // 2. 绘制三角形 5 // 设置起点 6 CGContextMoveToPoint(ctx, 10... 阅读全文
摘要:
1 #import 2 3 @interface NJRectView : UIView 4 @end 5 6 7 #import "NJRectView.h" 8 9 @implementation NJRectView10 11 - (void)drawRect:(CGRect)re... 阅读全文
摘要:
1 #import 2 3 @interface NJLineView : UIView 4 @end 5 6 7 #import "NJLineView.h" 8 9 @implementation NJLineView10 11 // 当自定义view第一次显示出来的时候就会调用dr... 阅读全文
摘要:
1 @interface NJTextImage : UIView 2 @end 3 4 5 @implementation NJTextImage 6 7 - (void)drawRect:(CGRect)rect 8 { 9 // [self test];10 // ... 阅读全文
摘要:
1 #import 2 3 @interface NJContatc : NSObject 4 5 @property (nonatomic, copy) NSString *name; 6 @property (nonatomic, copy) NSString *phoneNumber... 阅读全文