Closing a view displayed via a modal segue

℡╲_俬逩灬. 提交于 2019-12-02 16:08:51

If your deployment target is iOS 5.0 or later, use this message:

[self dismissViewControllerAnimated:YES completion:nil];

Or in Swift:

self.dismissViewControllerAnimated(true, completion: nil)

If your deployment target is older, use this (deprecated) message:

[self dismissModalViewControllerAnimated:YES];
denny

[self dismissViewControllerAnimated:YES completion:nil]; is a new way in IOS5

The following should work fine...

[self dismissModalViewControllerAnimated:YES];

I do exactly this with a login page in my latest tutorial here, with no issues.

The following code works in swift 3:

 self.dismiss(animated: true, completion: nil)
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!