32、获取状态栏和导航栏高度、宽度信息

 // 状态栏(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);   // 高度 

原文地址:https://www.cnblogs.com/qiangzheVSruozhe/p/6829680.html