iOS*_*pal 5 uinavigationbar uinavigationcontroller ios uistatusbar swift
我需要一个透明的状态栏,如下图所示。
我试过了
UIView *statusBar = [[[UIApplication sharedApplication] valueForKey:@"statusBarWindow"] valueForKey:@"statusBar"];
if ([statusBar respondsToSelector:@selector(setBackgroundColor:)]) {
statusBar.backgroundColor = [UIColor clearColor];
}
Run Code Online (Sandbox Code Playgroud)
但这基本上给出了与UIStatusBarStyleLightContent相同的结果。
By default, status bar has transparent background, you just need to extend frame of your image, behind status bar.
Here is test snapshot for you. I've set UIImageView with red background color and custom image.
| 归档时间: |
|
| 查看次数: |
1938 次 |
| 最近记录: |