I want to make slide out menu. For this I have to create UINavigationViewController which will controlMenuViewController(Table View) and ProfileViewController(Content View)
I want to set UINavigationViewController like a rootViewController, for this I wrote this code in AppDelegate.swift
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
let nav1 = UINavigationController()
let mainView = MainViewController(menuViewController: nil, contentViewController: nil) //ViewController = Name of your controller
nav1.viewControllers = [mainView]
self.window?.rootViewController = nav1
self.window?.makeKeyAndVisible()
return true
}
MainViewController is my UINavigationViewController.
But here I have error
nil is not compatible with expected argument type 'UIViewController'
What I should do?
let nav1 = UINavigationController()for?