ユーザーの場所を描画しているMKMapViewでスクリーンショットを撮ろうとしていますが、BreadCrumbsクラスのCrumbPathクラスとCrumbPathViewオーバーレイクラスおよびオーバーレイビュークラスを使用してパスを描画します。
スクリーンショットを取得するために使用しているコードは次のとおりです。
if ([[UIScreen mainScreen] respondsToSelector:@selector(scale)])
UIGraphicsBeginImageContextWithOptions(self.view.frame.size, NO, [UIScreen mainScreen].scale);
else
UIGraphicsBeginImageContext(self.view.frame.size);
[self.view.layer renderInContext:UIGraphicsGetCurrentContext()];
UIImage * viewImage = UIGraphicsGetImageFromCurrentImageContext();
UIImage * croppedImage = [Utils cropImage:viewImage withFrame:_map.frame];
UIGraphicsEndImageContext();
UIImageWriteToSavedPhotosAlbum(croppedImage, nil, nil, nil);
私が取得しようとしているScreenShotは次のようになります。
しかし、私が取得するScreenShotは次のようになります。
ここでは、スクリーンショットに青い線(ユーザーロケーションパス)がないことがわかります。
誰かが私が解決策を提案するのを手伝ってもらえますか、または私がここで間違っていることは何ですか?
みんな、ありがとう。