Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在 MKMapView 的地图上有一个屏幕。如何将此屏幕复制到图像并像简单的 UIImageView 一样使用它。
这可能有效;
UIGraphicsBeginImageContextWithOptions(MKMapView.bounds.size, MKMapView.opaque, 0.0); [MKMapView.layer renderInContext:UIGraphicsGetCurrentContext()]; UIImage *image = UIGraphicsGetImageFromCurrentImageContext(); UIGraphicsEndImageContext();