开发者

iPhone - semi transparent black status bar over the application

开发者 https://www.devze.com 2023-01-30 06:00 出处:网络
In my iphone a开发者_运维百科pplication, 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 g

In my iphone a开发者_运维百科pplication, 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.

0

精彩评论

暂无评论...
验证码 换一张
取 消