---
title: "[ios]ios脱衣服/刮奖app-简单版"
author: "119568242"
date: "2014-07-31T12:21:42Z"
tags: []
categories: ["移动开发"]
slug: "ios-ios-app"
draft: false
lastmod: "2014-07-31T21:37:15Z"
id: 2098616
url: "https://poolo.iteye.com/blog/2098616"
---

其实就是两张图片，然后第一张图片被手指划过的地方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();  
![](http://dl2.iteye.com/upload/attachment/0099/7020/9dc98be3-fad6-3749-9f9b-efdcaca8ef04.gif)