I programmatically have several View controllers in the iOS Swift Project. I do not have storyboards and would like to avoid them if possible. Is there a way to switch to another file viewcontroller.swift (we will call it view2.swift ) and be part of the function that the button calls?
I tried the following:
let storyboard: UIStoryboard = UIStoryboard(name: "myTabBarName", bundle: nil) let vc: UIViewController = storyboard.instantiateViewControllerWithIdentifier("myVCID") as UIViewController self.presentViewController(vc, animated: true, completion: nil)
The above works with dropdowns, but I want another view2.swift to be called. It can be done?
ios8 swift viewcontroller presentviewcontroller
Z-Tech Jun 07 '14 at 16:56 2014-06-07 16:56
source share