简体   繁体   中英

iPhone - semi transparent black status bar over the application

In my iphone application, I want to have my view to be of height 480 pixesl. And above that, at the top, I want to have semi transparent black status bar over my view so that the back ground image in my view must be slightly visible behind status bar. How can I achieve it?

try this if it works
[[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleBlackTranslucent];
and send your imageView to the back.
[self.view sendSubviewToBack:imageView];

The best solution for this problem is to set:
1- self.wantsFullScreenLayout = YES; //in your view controller
2- [[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleBlackTranslucent]; //for your status bar.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM