UIImageをその枠内で再描画することによって、UIImageを反転/回転/回転させる方法を知っています。iPhone iOSどのようにUIViewをインプレースで反転/反映するのですか?
- (IBAction)reflectImageView:(UIImageView)imageView {
UIGraphicsBeginImageContextWithOptions(imageView.bounds.size, NO, 0.0);
CGContextRef context = UIGraphicsGetCurrentContext();
CGContextScaleCTM(context, 1.0, -1.0);
CGContextTranslateCTM(context, 0.0, -imageView.bounds.size.height);
[imageView.layer renderInContext:context];
imageView.image = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
}
しかし、どのようにして、以前と同じ位置に中心を保持することが望ましいですか?すべてのUIViewに対して「フリップ/リフレクション」エフェクトを作成するにはどうすればよいですか?
ありがとうございました!
あなたの質問は画像の回転方法に関する私の答えです:Pありがとう+1 –