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

 CGRect rect = [[UIApplication sharedApplication] statusBarFrame];

状态栏的高度:

float status height =  rect.size.height;

导航栏的高度:

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


你可能感兴趣的:(IOS)