UIImage *imagePhoto;
UIGraphicsBeginImageContext(mapview.bounds.size);//textview是需要截图的对象
[mapview.layer renderInContext:UIGraphicsGetCurrentContext()];
imagePhoto = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
UIImage *imagePhoto;
UIGraphicsBeginImageContext(mapview.bounds.size);//textview是需要截图的对象
[mapview.layer renderInContext:UIGraphicsGetCurrentContext()];
imagePhoto = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();