0

I have a subclass of UILabel that sets

self.layer.geometryFlipped = YES;

If I add this label as a subview to a view everything works as expected. But if I try to convert this view to an image the label is not visible/present in the result image.

UIGraphicsBeginImageContextWithOptions(self.bounds.size, self.opaque, 0.0);
[self.layer renderInContext:UIGraphicsGetCurrentContext()];
posterImage = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();

If before adding a label to the view I set label.geometryFlipped = NO then label appears (all letters except for the first one are upside down).

Am I doing something wrong here?

Dasha Salo
  • 5,159
  • 5
  • 26
  • 28
  • If I flip the rendering contents then all the other labels and images I have in the view will be upside down. I tried that but it doesn't seem to have any effect on the label in question... – Dasha Salo Apr 08 '13 at 12:34
  • Then render two contexts and composite the images. – CodaFi Apr 08 '13 at 12:36

0 Answers0