Moh*_*der 1 uiview nsthread ios
我正在开发一个应用程序,我需要从一个线程中截取屏幕截图.我无法使用以下代码执行此操作:
UIGraphicsBeginImageContextWithOptions(self.view.frame.size, YES, [[UIScreen mainScreen] scale]);
[self.view.layer renderInContext:UIGraphicsGetCurrentContext()];
UIImage *resultingImage = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
Run Code Online (Sandbox Code Playgroud)
如果有人要将此问题标记为重复,那么请提供一个正确的链接来回答并请关注此问题我也在询问有关在线程中创建图像的问题.
谢谢你的时间.
| 归档时间: |
|
| 查看次数: |
1072 次 |
| 最近记录: |