自定义的字符串格式为
@"123.02,234.23|321.23,432.0002|543.0003,432.0045|654.0034,567.0034|23.3443,56.0034|77.3440,55.3443|"
/**
*@brief:将BezierPath中的点转为字符串
*/
+ (NSString*)convertBezierPathToNSString:(UIBe...
分类:
其他好文 时间:
2014-07-30 12:13:33
阅读次数:
171
画一个头戴小圆的五边形:
- (void)drawPentagon{
//(1)UIBezierPath对象
UIBezierPath *aPath = [UIBezierPath
bezierPath];
//开始点
[aPath moveToPoint:CGPointMake(100.0,
1.0)];
//划线点
[aPa...
分类:
其他好文 时间:
2014-07-24 23:27:33
阅读次数:
309
a、利用UIBezierPath在DrawRect:中绘制一个给定颜色的三角位图,代码如下:- (void)drawRect:(CGRect)rect{ // Drawing code UIBezierPath *path = [UIBezierPath bezierPath]; [path m.....
分类:
其他好文 时间:
2014-07-16 23:03:57
阅读次数:
161
1. UIBezierPath* path = [UIBezierPathbezierPathWithRoundedRect:CGRectMake(30,30,100,100)cornerRadius:0]; CAShapeLayer* layer = [CAShapeLayerlayer]; l....
分类:
其他好文 时间:
2014-07-15 23:58:10
阅读次数:
554
CGRectrect =CGRectMake(100,100,100,100); UIView* bgView = [[UIViewalloc]initWithFrame:rect]; bgView.backgroundColor= [UIColorgrayColor]; [self.viewa.....
分类:
移动开发 时间:
2014-07-11 22:44:49
阅读次数:
250
主要的原理包括:
继承UIView ,重载drawrect和重载触摸事件
待实现的功能还有,路径数组保存等。
#import "testdrow.h"
@implementation testdrow
UIColor *pick_color;
int choose;
UIBezierPath *mpath ;
UIBezierPath *eraser_path;
NSTimer *myt...
分类:
移动开发 时间:
2014-06-03 00:20:36
阅读次数:
323