获取状态栏与导航栏高度
更新: 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