摘要: 思路是建一个UIView的子类,获取划动出的矩形,用协议将矩形传递给代理对象,依据该矩形完成图像数据的截取,并显示出来。截图视图类:#import @protocol UICutImgDelegate;@interface BIDCutView : UIView{ CGPoint startPoint; CGRect targetRect; id _delegate;}@property (assign , nonatomic) id delegate;@end@protocol UICutImgDelegate -(void)cutImgWithRect:(CGR... 阅读全文
posted @ 2013-08-01 14:56 MingFung_Liu 阅读(493) 评论(0) 推荐(0) 编辑
摘要: 思路是将每一次按下屏幕的touch move时的点存到一个数组里,即一个数组相当于一个笔画;再将该代表笔画的数组保存到一个大数组中,每组每次touch的移动都历遍大数组和笔画数组,将点于点之间连接起来。#import @interface BIDDrawView : UIView{ NSMutableArray *allPoints;}@end#import "BIDDrawView.h"@implementation BIDDrawView- (id)initWithFrame:(CGRect)frame{ self = [super initWithFrame:fram 阅读全文
posted @ 2013-08-01 12:37 MingFung_Liu 阅读(473) 评论(0) 推荐(0) 编辑