I'm trying to draw a subclass of UIView over top of an GLKView. The subclass works as a "health" indicator for the game, and transparency is required, outside of the drawn area.
I have tried using
self.opaque = NO;
[self setBackgroundColor:[UIColor clearColor]];
which have no effect, as well as pre-filling the view with a clear colour:
CGContextSetFillColorWithColor(ctx, [UIColor clearColor].CGColor);
CGContextFillRect(ctx, rect);
which also has no effect. Simply setting the alpha with
self.alpha = 0.0
also has no effect.
Any help would be appreciated!
Edit: The subclass is placed in interface builder, if it matters.