TransitionViewController is the protage of RRCustomPageController for Swift language. Check out the link for more details.
Firstly, you have to add the protocol PageController to your UIViewController class.
@objc protocol PageController {
var titlePageController: String? {get set}
var imagePageController: UIImage? {get set}
}func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
self.window = UIWindow(frame: CGRectMake(0, 0, UIScreen.mainScreen().bounds.size.width,
UIScreen.mainScreen().bounds.size.height))
var c1 = testViewController()
c1.imagePageController = UIImage(named: "user3")
var c2 = testViewController()
c2.titlePageController = "Custom Transition"
var c3 = testViewController()
c3.imagePageController = UIImage(named: "like")
let transitionController = TransitionViewController(controllersParam: [c1, c2, c3])
transitionController.startController = 1
self.window?.rootViewController = transitionController
self.window?.makeKeyAndVisible()
return true
}