I’m making an app and i have a view controller with a UISegmentedControl, and a want to switch between a MKMapView and a UITableView.
In the MKMapView i want to display a map with the users current location, and in the TableView i want to list some data. Thats it.
Sounds simple but i’m don’t know how to proceed, i tried to make my view controller a tableview controller and then add the MKMapview, also tried to just add both views and a simple view controller. Anyway, there is a right or better way to do that?
Thanks guys!
I would use 2 navigationControllers.
Declare your first navigationController as usual, then when user tap the segmentedControl, create your tableController with another navigationController, and display it as modalViewController.
Then, when user tap the tableViewController’s segmented control, just dismiss the viewController.