アクションシートを使用してタブバーアイテムから画面をキャプチャしようとしています。tabbaritem2を押すと、アクションシートが呼び出されます。tabbaritem1からビューコントローラーの画面をキャプチャしたい。このコードを使ってみました。
self.tabBarController.selectedIndex = 0;
UIGraphicsBeginImageContext(self.view.frame.size);
[self.view.layer renderInContext:UIGraphicsGetCurrentContext()];
UIImage * image = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
NSData * imageData = UIImageJPEGRepresentation(image, 1.0);
画面にtabbaritem1が表示されますが、常にtabbaritem2の画面がキャプチャされます...この問題は解決できますか?ありがとう