小编Lor*_*son的帖子

从MKMapView制作UIImage

我想创建一个UIImage来自MKMapView.我的地图在视图中正确显示,但UIImage生成的只是一个灰色图像.这是相关的片段.

UIGraphicsBeginImageContext(mapView.bounds.size);
[mapView.layer renderInContext:UIGraphicsGetCurrentContext()];
mapImage = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
Run Code Online (Sandbox Code Playgroud)

有谁知道如何UIImage使用MapKit?

mapkit ios

8
推荐指数
1
解决办法
7965
查看次数

标签 统计

ios ×1

mapkit ×1