Im looking for a solution to navigate to a viewcontroller in objective-C from a Swift viewcontroller.
Im using storybord with a navigation controller.
My Swift 2.0 code are as follows:
if ((user) != nil) {
let alert = UIAlertView(title: "Success", message: "You are now Logged In", delegate: self, cancelButtonTitle: "OK")
alert.show()
dispatch_async(dispatch_get_main_queue(), { () -> Void in
let viewController:UIViewController = UIStoryboard(name: "MainStoryboard", bundle: nil).instantiateViewControllerWithIdentifier("Menu")
self.presentViewController(viewController, animated: true, completion: nil)
})
} else {
let alert = UIAlertView(title: "Error", message: "\(error)", delegate: self, cancelButtonTitle: "OK")
alert.show()
}
})
}
The Viewcontroller in Objective-C i want to present are named : CategoriesController