`
119568242
  • 浏览: 420259 次
  • 性别: Icon_minigender_1
  • 来自: 深圳/湛江
社区版块
存档分类
最新评论

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

    博客分类:
  • ios
阅读更多

其实就是两张图片,然后第一张图片被手指划过的地方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();

 

  • 大小: 324 KB
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics