UIViewのスクリーンショットを撮影し、UIImageを返す関数です。UIViewに含まれるサブビューもレンダリングされるので、簡易画像合成ツールとしても利用できます。アルファチャンネル付きの画像を使えば、写真にフレームを重ねてプリクラ風の写真を作ったりできますね。 -(UIImage *)captureImage:(UIView *) view{ //Init ImageContext UIGraphicsBeginImageContext(view.bounds.size); //Render in current context [view.layer renderInContext:UIGraphicsGetCurrentContext()]; //Get the image UIImage *screenImage = UIGraphicsGetImageFromCurrent