I'm trying to segue from a button to a new viewController which is in another storyBoard, via a custom class. This is how the custom class looks.
import UIKit
import Foundation
class NavigationController{
static func segueToNextViewController(#storyboardName: String){
var eventsBoard: UIStoryboard = UIStoryboard(name: storyboardName, bundle: NSBundle.mainBundle())
var nextViewController = eventsBoard.instantiateInitialViewController() as! UIViewController
self.presentViewController(nextViewController, animated: true, completion: nil)
}
}
But I'm having an error stating: 'NavigationController.Type' does not have a member named 'presentViewController' on this line self.presentViewController(nextViewController, animated: true, completion: nil)
any help will be really appreciated