background image

}

-(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event

{

    [self.delegate clear];

    startPoint=[[touches anyObject] locationInView:self];

}

-(void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event

{

    CGPoint currentPoint=[[touches anyObject] locationInView:self];

    targetRect = CGRectMake(startPoint.x, startPoint.y, 
currentPoint.x-startPoint.x, currentPoint.y-startPoint.y);

    [self setNeedsDisplay];

}

-(void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event

{

    if (self.delegate && [self.delegate 
respondsToSelector:@selector(cutImgWithRect:)]) {

        [self.delegate cutImgWithRect:targetRect];

    }

}

@end

 

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

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