iOS 8 önce, evet, şimdi bu & ile sorun yoktu.iOS 8 Crash - renderInContext: UIGraphicsGetCurrentContext()
LOG:
Assertion failed: (CGFloatIsValid(x) && CGFloatIsValid(y)), function void CGPathMoveToPoint(CGMutablePathRef, const CGAffineTransform *, CGFloat, CGFloat), file Paths/CGPath.cc, line 254.
Bu benim kodudur:
UIImage* image = nil;
CGSize imageSize = CGSizeMake(self.view.bounds.size.width, self.view.bounds.size.height);
UIGraphicsBeginImageContextWithOptions(imageSize, NO , 0.0f);
[self.view.layer renderInContext:UIGraphicsGetCurrentContext()]; // <- ERROR
image = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
amacım görüntüye görünümü dönüştürülmesidir. Eğer çizim şeye boş dikdörtgenler için
Merhaba Philip, Ah! TAMAM! Teşekkürler. Denedim ama çalışmadı, bu kod UIGraphicsBeginImageContextWithOptions? halinde { (CGRectIsEmpty (self.view.bounds)!) [Self.view.layer renderInContext: UIGraphicsGetCurrentContext()]; } –
Tamam, ama katman ne olacak? Bir sorun ve bir sorun olabilir bir contentRect vardır. –
Evet, katmanı denedim ve değil ... –