【发布时间】:2012-02-16 03:53:26
【问题描述】:
我发现这段代码非常好:
+ (UIImage *) imageWithView:(UIView *)view
{
UIGraphicsBeginImageContextWithOptions(view.bounds.size, view.opaque, [[UIScreen mainScreen] scale]);
[view.layer renderInContext:UIGraphicsGetCurrentContext()];
UIImage * img = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
return img;
}
但我还需要捕获 UINavigationBar,因为我想在我的 UIStoryboardSegue 中使用图像作为过渡层。有什么想法吗?
【问题讨论】:
标签: ios animation uiview uiimage uinavigationbar