码迷,mamicode.com
首页 > 移动开发 > 详细

iOS 获取导航栏和状态栏的高度

时间:2017-05-14 12:29:33      阅读:242      评论:0      收藏:0      [点我收藏+]

标签:bottom   statusbar   article   usb   share   nav   bar   sha   ott   

 CGRect rect = [[UIApplication sharedApplication] statusBarFrame];

状态栏的高度:

float status height =  rect.size.height;

导航栏的高度:

float navigationheight = self.navigationController.navigationBar.frame.size.height;


iOS 获取导航栏和状态栏的高度

标签:bottom   statusbar   article   usb   share   nav   bar   sha   ott   

原文地址:http://www.cnblogs.com/zsychanpin/p/6851748.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!