我使用一个presentModalViewController来呈现一个视图,然后在我尝试使用removeFromSuperview删除一个UView之后,它不再工作了。
在我使用presentModalViewController命令之前,从superview中删除in视图是没有问题的。
什么改变了?
发布于 2012-05-31 06:55:42
首先,presentModalViewController已被弃用,因此您不应该使用它。
根据UIViewController class reference,您应该改用presentViewController:animated:completion:。
其次,如果您使用任何present??ViewController方法,为了消除它,您应该像这样使用适当的dismiss??ViewController:
// Present the view controller
[self presentViewController:viewController animated:YES completion:NULL];
// Later, to dismiss it:
[self dismissViewControllerAnimated:YES completion:NULL];https://stackoverflow.com/questions/10824543
复制相似问题