0
votes

I want to have a UISegmentedControl in/below the UINavigationBar of a UINavigationController which stays in the same position in case of a segue. This is the same effect as the bookmarks menu in Safari (iOS):

Safari Bookmarks Menu

With the approaches as described in these answers (similar as this explanation) I am able to show the UISegmentedControl in a toolbar directly below the UINavigationBar of the UINavigationController, but if the UINavigationController pushes a new UIViewController the toolbar and the UISegmentedControl which it contains are pushed off-screen.

What is the solution to force the UISegmentedControl to stay in the same position if the UINavigationController pushes a new UIViewController?

UPDATE 29 August: I also tried this CocoaCasts tutorial but that does not provide the required solution as I require a UINavigationController with the regular push animation and back button (like in the Safari Bookmarks Menu) and in addition a UISegmentedControl which stays in the same position when the UINavigationController pushes a new UIViewController (which push is not triggered due to a touch on the UISegmentedControl but, for example, due to a touch on a UITableView cell on the rootviewcontroller of the UINavigationController).

1

1 Answers

0
votes

You need to do this with View Controller Containment. Please follow this link.