I\'m working on a universal app, and I\'m trying to share as much code as possible between the iPhone and iPad versions. I need to use a TabBarController as my root view contro
I was able to brute force as follows. In viewDidLoad
or loadView
:
if (self.navigationController.navigationBar.frame.origin.y > 0.0) {
self.navigationController.navigationBar.frame = CGRectOffset(self.navigationController.navigationBar.frame, 0.0, -20.0);
}
And in viewDidAppear:
if (self.view.superview.frame.origin.y > 44.0) {
UIView *container = self.view.superview;
container.frame = CGRectMake(container.frame.origin.x, container.frame.origin.y - 20.0, container.frame.size.width, container.frame.size.height + 20.0);
}
It's ugly, but it seems to work.