I have this code, and it is working exactly as desired:
UIGraphicsBeginImageContext(self.bounds.size);
[self.layer renderInContext:UIGraphicsGetCurrentContext()];
UIImage* image = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
However, for this line:
[self.layer renderInContext:UIGraphicsGetCurrentContext()];
I am getting the warning (not error):
No '-renderInContext' method found.
How can I have this warning, if in fact the method is working? If I were to simply comment out this line, my code fails; so clearly the line, and thus the method, are in fact working.