I’m trying to create a similar “area chooser” as in the “Path” application.
Idea is to have a button in the navigation bar that will trigger the controller to slide away to reveal a data “selector”.
Given the following UI structure:

The main controller is a UINavigationController as I need to add further levels of information later.
Basically it works like this:
App starts with the data table in foreground. User can click on data or on the top left navigation item.

Once clicked on the navigation item, it will move the navigation bar, toolbar and tableView aside to reveal the selector table View:

The code which moves everything away is:
- (IBAction)toggleAreaSelector:(id) sender {
float offsetX = self.tableView.frame.origin.x == 0 ? 300 : -300;
[UIView animateWithDuration:0.3f delay:0 options:UIViewAnimationCurveEaseIn animations:^{
self.navigationController.navigationBar.frame = CGRectOffset(self.navigationController.navigationBar.frame, offsetX, 0);
self.toolBar.frame = CGRectOffset(self.toolBar.frame, offsetX, 0);
self.tableView.frame = CGRectOffset(self.tableView.frame, offsetX, 0);
} completion:^(BOOL finished) {
self.navigationController.navigationBar.userInteractionEnabled = offsetX == 300 ? NO : YES;
self.tableView.userInteractionEnabled = offsetX == 300 ? NO : YES;
}];
}
The problem is: I cannot click the first item in the selector, “Area 0”. I think it’s because the UINavigationBar still holds a “touch” lock to the area and receives all touches.
Perhaps it’s also due to the fact that, when visible in interface builder, I can also see my selector view being behind the UINavigationBar. After all, that might be the wrong approach to go?
Thanks for any ideas.
Happy to have found the solution now.
@jonkroll`s link was the most helpful, as another people have successfully tried to implement this UI pattern before.
The key issue is about using
That way each view controller is managed independently and most important: same for its view.
Once this is done, the managing controller can do almost everything to these views.