Megaetron Megaetron - 4 months ago 40
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.