IOS 4.3永久隐藏状态栏 [英] IOS 4.3 hide status bar permanently

查看:79
本文介绍了IOS 4.3永久隐藏状态栏的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试隐藏iOS 4.3中的状态栏,因为 setStatusBarHidden:animated:已被弃用:

I'm trying to hide the status bar in iOS 4.3 now that setStatusBarHidden:animated: is deprecated:

[[UIApplication sharedApplication] setStatusBarHidden:YES animated:NO]; //deprecated

plist文件中唯一存在的选项是:状态栏最初是隐藏的。其中只隐藏了应用开始时的状态栏。

The only option that exists in the plist file is: Status bar is initially hidden. Which only hides the status bar at the start of the app.

干杯

推荐答案

试试这个:

[[UIApplication sharedApplication] setStatusBarHidden:NO withAnimation:UIStatusBarAnimationFade];

来自Apple Class Reference:

From Apple Class Reference:


setStatusBarHidden:withAnimation:

setStatusBarHidden:withAnimation:

隐藏或显示状态栏,
可选择设置转换动画。
- (void)setStatusBarHidden:(BOOL)hidden
withAnimation:(UIStatusBarAnimation)animation
参数

Hides or shows the status bar, optionally animating the transition. - (void)setStatusBarHidden:(BOOL)hidden withAnimation:(UIStatusBarAnimation)animation Parameters

hidden
YES隐藏状态栏,NO显示状态栏。

hidden YES to hide the status bar, NO to show the status bar.

动画
一个常数,表示是否应该有一个动画,如果要求
一个,是否应该
淡化状态栏输入或输出或
是否应该将状态栏
滑入或滑出。

animation A constant that indicates whether there should be an animation and, if one is requested, whether it should fade the status bar in or out or whether it should slide the status bar in or out.

这篇关于IOS 4.3永久隐藏状态栏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆