Is there a function to terminate the UIviewcontroller like in Android?
2 answers
Not really. In iOS land, you have to more explicitly call viewController.dismissViewControllerAnimated(true, completion: nil)
if your view controller is modal, or one of the various firing methods in the UINavigationController if your viewController was clicked on the screen.
In Swift 3, this function:
viewController.dismiss(animated: true)
+8
source to share