简体   繁体   English

iPhone MapView保存到相册

[英]iPhone MapView save to Photo Album

如何将MapView保存到PhotoAlbum,以便以后附加到在iPhone应用程序中创建的电子邮件中?

Try this: 尝试这个:

UIGraphicsBeginImageContext(map.layer.bounds.size);
[map.layer renderInContext:UIGraphicxGetCurrentContext()];
UIImage *mapImage = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();

And perhaps you should also double-check Google's licensing terms if they allow making and distributing screenshots of the maps. 也许您还应该仔细检查Google的许可条款,如果它们允许制作和分发地图的屏幕截图。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM