Wednesday, 7 August 2013

UIView with transparent background flickers on presentation

UIView with transparent background flickers on presentation

I've got really simple view controller that does this in its init:
self.view.backgroundColor = [UIColor colorWithRed:0 green:0 blue:0
alpha:0.65];
When the view is added as a subview of a view that's already on screen,
it's background flickers black (ignores the alpha) and then back to the
proper color (with alpha). No flicker occurs when alpha is 0 (no surprise)
or 1 (no surprise). Note that I'm not touching the alpha or opacity
properties on the view or layer as that would cause all the subviews to be
transparent also.
Any thoughts on how to fix the flicker?

No comments:

Post a Comment