-
Notifications
You must be signed in to change notification settings - Fork 7
Description
I wanted to have the UINavigation controller at the bottom of the screen rather then the top. So I created this method to move it.
-
(void) setupNavController
{
// Initialize the Navigation Controller
navigationController = [[UINavigationController alloc] init];// Get the bounds of the main view
CGRect viewFrame = self.view.frame;// Get the height of the toolbar
CGFloat barHeight = self.navigationController.navigationBar.frame.size.height;// Calculate the new y for the bar
CGRect navFrame = navigationController.view.frame;
navFrame.origin.y = ((viewFrame.size.height - viewFrame.origin.y) - barHeight);
navigationController.view.frame = navFrame;// Calculate the new bounds of the views in the nav controller
CGRect navBounds = navigationController.view.bounds;
navBounds.origin.y = viewFrame.size.height;
navigationController.view.bounds = navBounds;
}
It all works perfectly until you go to try to click inside the views, which you can't. It's almost as if the clickable area isn't correct.
Any suggestions?