ボタンからポップオーバーを表示しています。ポップオーバーでユーザーは描画を作成できます。この描画を UIImage としてキャプチャしたいと思います。
現時点では、このチュートリアルに似た UIBezierPath を使用した単純な線画です: http://soulwithmobiletechnology.blogspot.com/2011/05/uibezierpath-tutorial-for-iphone-sdk-40.html
助けてくれてありがとう!
ボタンからポップオーバーを表示しています。ポップオーバーでユーザーは描画を作成できます。この描画を UIImage としてキャプチャしたいと思います。
現時点では、このチュートリアルに似た UIBezierPath を使用した単純な線画です: http://soulwithmobiletechnology.blogspot.com/2011/05/uibezierpath-tutorial-for-iphone-sdk-40.html
助けてくれてありがとう!
他の誰かがこれに遭遇した場合。renderInContext が見つからない場合
#import <QuartzCore/QuartzCore.h>
実際のコピーペーストソリューションの場合:
#import <QuartzCore/QuartzCore.h>
- (UIImage*) screenShot {
UIGraphicsBeginImageContext(_view.bounds.size);
[_view.layer renderInContext: UIGraphicsGetCurrentContext()];
UIImage *viewImage = UIGraphicsGetImageFromCurrentImageContext(); //renders view to an image
UIGraphicsEndImageContext();
return viewImage;
}