Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
UIView (サブビューを UIImageViews として) をプログラムで UIImage に変換するにはどうすればよいですか?
これは一般的な方法ですか?
特定のビューの「スクリーンショット」が必要なようですか?
UIGraphicsBeginImageContext(view.bounds.size); CGContextRef ctx = UIGraphicsGetCurrentContext(); [view.layer renderInContext:ctx]; UIImage *image = UIGraphicsGetImageFromCurrentImageContext(); UIGraphicsEndImageContext();