I want to get height of view except navigation bar. I used below method so far. Is there better way? And isn’t it dangerous to hardcode height of navigation bar as 44.0?
CGRect screenRect = [[UIScreen mainScreen] applicationFrame];
viewHeight = screenRect.size.height - 44.0;
What do you want combine for ? It’s simple and the best way.
If you do that often in your code you can make some macro like
#define kViewHeight CGRect screenRect = [[UIScreen mainScreen] applicationFrame]; viewHeight = screenRect.size.height - 44.0;or something like that.