background image

IOS 截图 Demo

思路是建一个

UIView 的子类,获取划动出的矩形,用协议将矩形传递给代理

对象,依据该矩形完成图像数据的截取,并显示出来。

截图视图类:

#import <UIKit/UIKit.h>

@protocol UICutImgDelegate;

@interface BIDCutView : UIView

{

    CGPoint startPoint;

    CGRect targetRect;

    

    id <UICutImgDelegate> _delegate;

}

@property (assign , nonatomic) id delegate;

@end

@protocol UICutImgDelegate <NSObject>

-(void)cutImgWithRect:(CGRect) aRect;

-(void)clear;

                   找软件资料,就到一览软件文库

http://wk.yl1001.com/rj/