Have a view which I want to make transparent, it works on the simulator, but for some reason not on my device. I have no idea why this happens. My code looks like this:
- (void)viewDidLoad
[...]
UIView *transparentBackgroundView = [[UIView alloc] initWithFrame:self.view.frame];
// Doesn't work on my device.
transparentFlipBackgroundView.backgroundColor = [UIColor clearColor];
// I have also tried.
// transparentFlipBackgroundView.alpha = 0;
// transparentFlipBackgroundView.opaque = YES
// transparentFlipBackgroundView.layer.backgroundColor = [UIColor clearColor].CGColor;
// I later add the view to an array...
self.pageViews = [[NSMutableArray alloc] initWithObjects:transparentFlipBackgroundView, lastPage, nil];
[...]
}
Any ideas why this happens, and how should I make the UIView transparent?
Have you got another device you can try it on? If it works on the simulator, surely it should work on your device too? If you’d like, I wouldn’t mind trying on one of my devices.