I have a modal popup view with a nav bar and when I try to access the height of that nav bar from the currently loaded view using the statement…
self.navigationController.navigationBar.frame.size.height;
…it returns 0. Why would that be?
Thanks so much in advance for your wisdom!
It is probably because one of the object you are using in your expression is
nil.This is probably the
self.navigationControlleritself for example. Maybe you misinterpreted your view hierarchy? (Try toNSLog(@"%@", self.navigationController);to check if it isnilor not and be sure)