获取状态栏与导航栏高度

更新: 2018/02/03 因为搬家到博客园,故把源文本代码变成作为代码贴上

状态栏

let statusFrame = UIApplication.shared.statusBarFrame

let statusHeight = statusFrame.height

let statusWidth = statusFrame.width
 
 
导航栏
let naviFrame = self.navigationController?.navigationBar.frame

let naviHeight = naviFrame?.height

let naviWidth = naviFrame?.Width

 

 

posted @ 2017-08-21 12:14  懒虫哥哥  阅读(801)  评论(0编辑  收藏  举报