2

iPhone 3で完全に正常に動作するiOSアプリで丸みを帯びた写真を取得する方法を使用しました。私の問題は、iPhone 4以降で試すとすぐに写真の品質が低下することです。

高解像度の丸みを帯びた画像を取得するためにコードを好転させる方法はありますか?

-(void) setRoundedView:(UIImageView *)imageView picture: (UIImage *)picture toDiameter:(float)newSize{

UIGraphicsBeginImageContextWithOptions(imageView.bounds.size, NO, 1.0);

[[UIBezierPath bezierPathWithRoundedRect:imageView.bounds
                            cornerRadius:100.0] addClip];

CGRect frame=imageView.bounds;
frame.size.width=newSize;
frame.size.height=newSize;
[picture drawInRect:frame];

imageView.image = UIGraphicsGetImageFromCurrentImageContext();

    UIGraphicsEndImageContext();
}

助けてくれて本当にありがとうございます!

4

1 に答える 1