-1

1つのイメージビューのスクリーンショットを撮りたいです。そのスクリーンショットを別のイメージビューの画像として設定します。この過程で打った。私を助けてください。

4

2 に答える 2

5
UIGraphicsBeginImageContext(imageView.frame.size);
 [imageView.layer renderInContext:UIGraphicsGetCurrentContext()];
 UIImage *viewImage = UIGraphicsGetImageFromCurrentImageContext();
 UIGraphicsEndImageContext();
yourSecondImageView.image = viewImage;
于 2012-08-28T14:23:07.283 に答える
2

使用しているUIImageViewのUIImageプロパティを取得し、それを必要な他の画像ビューに割り当てる必要があります。

于 2012-08-28T14:19:10.790 に答える