Implementing UIPageViewController's logic as a subview to a UIViewController in Swift
I have to implement a UIPageViewController as a subview to my UIViewController. The UIPageViewController has some logic and other ViewControllers inside. My question is how to connect these two pieces of code below. So this is my main UIViewController code: class MyMainViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() } override func didReceiveMemoryWarning() { super.didReceiveMemoryWarning() } } and my UIPageViewController code, which implements an endless loop between ViewControllers that he contains (I copied the whole code, probably it wasn't necessary ):