I want to switch to the new view controller when I click the button without using the navigation controller, and I seem to be unable to do this. I searched everywhere for the answer, but everything I found, either in objective-c, or using the navigation controller, or does not work at all.
func gunsoutButtonPressed(sender:UIButton!) {
print("yay\t")
let encounterViewController = self.storyboard.instantiateViewControllerWithIdentifier("encounterViewController") as encounterViewController
self.pushViewController(encounterViewController, animated: true)
}
source
share