Megaetron Megaetron - 5 months ago 47
Swift Question

Is there a function to finish a UIviewcontroller like in android?

In android you can call the method

and the activity closes. Is there something similar in swift?


Not quite. In iOS land you have to more explicitly call viewController.dismissViewControllerAnimated(true, completion: nil) if your view controller is a modal or one of the various dismissal methods on UINavigationController if your viewController was pushed on to the screen.