Questions tagged «graphicscontext»

6
iOS:以编程方式制作屏幕截图的最快,最高效的方法是什么?
在我的iPad应用程序中,我想制作一个UIView的屏幕截图,该截图占据了屏幕的很大一部分。不幸的是,子视图嵌套得很深,因此制作屏幕快照和动画页面卷曲后需要很长时间。 有没有比“通常”更快的方法? UIGraphicsBeginImageContext(self.bounds.size); [self.layer renderInContext:UIGraphicsGetCurrentContext()]; UIImage *resultingImage = UIGraphicsGetImageFromCurrentImageContext(); UIGraphicsEndImageContext(); 如果可能的话,我想避免缓存或重组视图。
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.