计算状态栏和导航条的高度
2015-10-13 19:40
302 查看
// 状态栏(statusbar)
CGRect rectStatus = [[UIApplication sharedApplication] statusBarFrame];
NSLog(@"status width - %f", rectStatus.size.width); // 宽度
NSLog(@"status height - %f", rectStatus.size.height); // 高度
// 导航栏(navigationbar)
CGRect rectNav = self.navigationController.navigationBar.frame;
NSLog(@"nav width - %f", rectNav.size.width); // 宽度
NSLog(@"nav height - %f", rectNav.size.height);
CGRect rectStatus = [[UIApplication sharedApplication] statusBarFrame];
NSLog(@"status width - %f", rectStatus.size.width); // 宽度
NSLog(@"status height - %f", rectStatus.size.height); // 高度
// 导航栏(navigationbar)
CGRect rectNav = self.navigationController.navigationBar.frame;
NSLog(@"nav width - %f", rectNav.size.width); // 宽度
NSLog(@"nav height - %f", rectNav.size.height);
相关文章推荐
- android listview 取消头部分割线
- 软件测试基础知识总结
- 使用uitableview的索引功能
- OC学习之初步对象的建立
- Ubuntu环境下安装python的flask
- 写代码,请不要中断
- Objective-C中代码块的学习
- 侧滑返回功能失效解决
- UIView与CALayer的理解
- 有关圆的计算。
- centos7 matlab install
- 坚持坚持坚持
- linux上应用程序的执行机制
- Rotate Array
- 杭电acm--1040
- tomcat Manger App
- struts2拦截器问题
- 【C++】指针&引用的区别
- Xsollad电竞学院为学生和教练打开大门啦!
- 【LeetCode】Binary Tree Level Order Traversal 解题报告