检查状态栏是否隐藏或可见
我想检查状态栏的状况。我如何检查状态栏是否可见。
请任何人指导我做到这一点..
谢谢大家
I want to check condition for statusbar. How can i check condition if status bar is visible or not .
please anyone guide me to do this..
Thank you all
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
检查状态栏是否隐藏:
Objective C:
Swift:
隐藏状态栏:
Check if status bar is hidden:
Objective C:
Swift:
Hide status bar:
Swift 3
隐藏状态栏(
setStatusBarHidden
在 iOS 9 中已弃用)在您的
ViewController
中覆盖:Swift 3
To hide the status bar (
setStatusBarHidden
is deprecated in iOS 9)override in your
ViewController
:您可以使用
[UIApplication sharedApplication]
的statusBarHidden
属性检查当前状态您可以使用
– setStatusBarHidden:withAnimation:
设置当前状态请参阅更多精彩东西。
华泰
You can check the current state by using the
statusBarHidden
property of[UIApplication sharedApplication]
You can set the current state using
– setStatusBarHidden:withAnimation:
See the docs for more awesome stuff.
HTH
您还可以在界面生成器的 xib 中的视图属性中检查这一点,您可以看到灰色/黑色/半透明/未指定的四个选项。
U can Also check this in xib of interface builder in view attributes u can see four options for it gray/ black/ translucent/ unspecified..