i have been working on an pageViewController in swift and xcode. I used the default template in xcode and made a pageViewController application. But now i want to place a button on the pageViewController that shows on all pageViewControllers and when tapped that button the pageViewController dismissed and the RootViewController screen is shown back. I have written this line but this does nothing.
self.dismiss(animated: true, completion: nil)
But this is of no help. Can you please tell me how can i achieve this? Thank you.