I want to use Segmented Control to choice between contact form and contact details in the contact ViewController in my app. The contact ViewController is managed by the TabBarController. But when switching by using the Segmented Control the TabBar on the bottom disappears.
I uploaded a sample project here: SegmentedControlTest
Is there a simple way to solve that issue?
Keeping the current structure you can:
- Embed ContactFormVC in NavigationController (editor -> embed in -> NavigationController) and on the NavigationController property uncheck "Shows Navigation Bar"
- On both ContactFormVC and ContactDetailsVC set its "presentation" property (under "Transition Style") to "Current Context"; Your storyboard will look like this
You should change your transition to push and pop instead of both "show" otherwise you'll keep adding on the navigation stack. It's easy to do via code, I can't find how to do this via storyboard. I also recommend changing the structure for your view controllers as suggested by previous answer.
The way I encourage you to do is to use single view controller with multiple container views.