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

posted on 2017-05-09 11:13  强者VS弱者  阅读(326)  评论(0编辑  收藏  举报