J'obtiens un avertissement du compilateur à l'étape -renderInContext :
- (UIImage *) imageFromView:(UIView *)view {
UIGraphicsBeginImageContextWithOptions(view.bounds.size, view.opaque, 0.0);
[view.layer renderInContext:UIGraphicsGetCurrentContext()];
UIImage * img = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
return img;
}
J'ai QuartzCore dans le projet de frameworks, et le code fonctionne. Comment puis-je corriger le code pour qu'il cesse de me donner l'avertissement ?
L'avertissement exact que je reçois est le suivant
warning: no '-renderInContext:' method found
warning: (Messages without a matching method signature
warning: will be assumed to return 'id' and accept
warning: '...' as arguments.)