我的問題是這樣的:[presentViewController:B]但我想看到A的視圖。 我是這樣的問題的解決方案。在A(UIViewController)presentViewController後看到視圖(A.view):B(UIViewController)
換句話說,我想要一個獨特的UIWindow圖片。
UIWindow *_applicationWindow = [[[UIApplication sharedApplication] delegate] window];
UIGraphicsBeginImageContext(_applicationWindow.bounds.size);
CGContextRef ctx = UIGraphicsGetCurrentContext();
[_applicationWindow.layer renderInContext:ctx];
UIImage *imageTemp = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
UIImageView *_imageView = [[[UIImageView alloc] init] autorelease];
_imageView.image = imageTemp;
[B.veiw addSubview:_imageView];
但_imageView不明顯。
感謝。
請在你正在做的事情中更具描述性...... – 2013-05-02 03:28:21
我想從UIWindow得到一個清晰的圖片 – huqinghe 2013-05-02 04:18:38