我的代码适用于普通设备,但在视网膜设备上会产生模糊图像.
有人知道我的问题的解决方案吗?
+ (UIImage *) imageWithView:(UIView *)view
{
UIGraphicsBeginImageContext(view.bounds.size);
[view.layer renderInContext:UIGraphicsGetCurrentContext()];
UIImage * img = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
return img;
}
Run Code Online (Sandbox Code Playgroud) 如果我有一条折线的路径保存为string,
来自谷歌地图sdk: path.encodedPath()
或者我有一系列latlng的观点,
我可以为该路径绘制缩略图吗?
我不想画它mapView,我想知道我是否可以在任何其他视图中绘制它imageView或类似的任何东西.