【发布时间】:2015-03-14 14:02:53
【问题描述】:
我正在使用此 Swift 代码截取我的应用程序的屏幕截图:
UIGraphicsBeginImageContextWithOptions(UIScreen.mainScreen().bounds.size, false, 0);
self.view.drawViewHierarchyInRect(view.bounds, afterScreenUpdates: true)
var image:UIImage = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
我将如何只截取屏幕的一部分而不是全部截屏,就像我在这里所做的那样?
【问题讨论】:
标签: ios swift screenshot fullscreen