I have a UISegmentedControl
added to a UIToolbar
:
UIToolbar *toolbar = [[UIToolbar alloc] initWithFrame:toolbarFrame];
toolbar.barS
I've replaced
[self.view.layer renderInContext:UIGraphicsGetCurrentContext()];
With
[self.view drawViewHierarchyInRect:self.view.bounds afterScreenUpdates:YES];
And now it works as expected. Still don't understand why that happens though.
Note that drawViewHierarchyInRect:afterScreenUpdates:
is iOS 7 only.