[ios]ios脱衣服/刮奖app-简单版

其实就是两张图片,然后第一张图片被手指划过的地方clear掉再生成图片。赋值给上层的ImageView。

        UIGraphicsBeginImageContext(self.topImageView.frame.size);

        [self.topImageView.imagedrawInRect:self.topImageView.bounds];

        CGContextClearRect(UIGraphicsGetCurrentContext(), CGRectMake(point.x-5, point.y-5, 10, 10));

        self.topImageView.image=UIGraphicsGetImageFromCurrentImageContext();

        UIGraphicsEndImageContext();

 

猜你喜欢

转载自poolo.iteye.com/blog/2098616
今日推荐