Rod*_*igo 1 iphone cocoa-touch uikit uiimage ios
我在MKMapView的地图上有一个屏幕.如何将此屏幕复制到图像并像简单的UIImageView一样使用它.
这可能有用;
UIGraphicsBeginImageContextWithOptions(MKMapView.bounds.size, MKMapView.opaque, 0.0);
[MKMapView.layer renderInContext:UIGraphicsGetCurrentContext()];
UIImage *image = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
439 次 |
| 最近记录: |