透明にしたいビューがあります。シミュレーターでは機能しますが、何らかの理由でデバイスでは機能しません。なぜこれが起こるのか分かりません。私のコードは次のようになります:
- (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];
[...]
}
これが発生する理由と、UIViewを透過的にするにはどうすればよいですか?