I have segmented button control in view controller.
The problem is that when I click on the "Data 3" tab, it goes to Data3 View Controller.
I would like to be Data3 View Controller shows inside ViewController-1 UI (Under segmented control button.)
let mainStoryboard: UIStoryboard = UIStoryboard(name: "Main", bundle: nil)
let innerPage: Data3 = mainStoryboard.instantiateViewController(withIdentifier: “Data3”) as! MediaPack
self.present(innerPage, animated: true, completion: nil)
How could I do this?
To accomplish that task you either use UiPageViewController or ContainerView that contain your viewController3. Find below link to implement
UiPageViewController http://samwize.com/2015/10/13/how-to-create-uipageviewcontroller-in-storyboard-in-container-view/
ContainerView https://cocoacasts.com/managing-view-controllers-with-container-view-controllers/