适配ios7
来源:互联网 发布:薪酬数据分析方法 编辑:程序博客网 时间:2024/06/04 17:54
xcode升级到Xcode5 在ios7运行 程序的状态栏StatusBar消失了,现在有解决办法了 1.在appdeletage里面 添加如下代码: if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 7) { self.window.frame = CGRectMake(0,20,self.window.frame.size.width,self.window.frame.size.height-20); } 2.在info.plist文件里面 属性:View controller-based status bar appearance 值设为NO 接着运行程序,可以看到StatusBar了
if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 7) {
[application setStatusBarStyle:UIStatusBarStyleLightContent];
self.window.clipsToBounds =YES;
self.window.frame = CGRectMake(0,20,self.window.frame.size.width,self.window.frame.size.height-20);
//Added on 19th Sep 2013
self.window.bounds = CGRectMake(0, 20, self.window.frame.size.width, self.window.frame.size.height);
}
第一步 在项目的Info.plist 文件中 添加一行属性配置
View controller-based status bar appearance =NO
这个设置为:View Controller 不对status Bar 显示进行操作
if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 7) {
[application setStatusBarStyle:UIStatusBarStyleLightContent];
self.window.clipsToBounds =YES;
self.window.frame = CGRectMake(0,20,self.window.frame.size.width,self.window.frame.size.height-20);
//Added on 19th Sep 2013
self.window.bounds = CGRectMake(0, 20, self.window.frame.size.width, self.window.frame.size.height);
}
第一步 在项目的Info.plist 文件中 添加一行属性配置
View controller-based status bar appearance =NO
这个设置为:View Controller 不对status Bar 显示进行操作
?
1
2
3
4
5
6
7
8
9
10
11
12
13
- (
BOOL
)application:(UIApplication *)application didFinishLaunchingWithOptions:(
NSDictionary
*)launchOptions
{
self
.window = [[[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]] autorelease];
if
([[[UIDevice currentDevice] systemVersion] floatValue] >= 7) {
[application setStatusBarStyle:UIStatusBarStyleLightContent];
self
.window.clipsToBounds =
YES
;
self
.window.frame = CGRectMake(0,20,
self
.window.frame.size.width,
self
.window.frame.size.height-20);
//added on 19th Sep
self
.window.bounds = CGRectMake(0, 20,
self
.window.frame.size.width,
self
.window.frame.size.height);
}
0 0
- 适配ios7
- ios7适配
- ios7适配
- 适配IOS7
- 适配iOS7
- 适配IOS7
- ios7适配
- ios7适配
- iOS7适配
- iOS7适配
- 适配ios7
- iOS7 适配
- IOS7适配
- 适配ios7
- ios7适配
- 适配IOS7
- iOS7适配
- ios7适配
- linux网络的基本配置
- GCC编译器的使用
- POJ 3687 Labeling Balls(拓扑序列)
- 如何编译时禁止多余部分分配空间(如:禁止未调用函数参与编译)避免浪费code空间和警告?
- 第一次使用csdn软件心得
- 适配ios7
- 每个Linux用户都应该了解的命令行省时技巧
- linux下查看mysql、apache是否安装,并卸载
- 最近学习linux的体会
- 编程技术面试的五大要点
- VC++ 中操作Excel文档的方法,读取,查询,写入,修改,删除
- OCP-1Z0-053-200题-26题-134
- Spring
- RSA算法