是什么阻止了模态视图 Controller 被关闭?我发现dismissModalViewControllerAnimated 并不总是有效?例如,这将不起作用:

SettingsViewController* settings = [[SettingsViewController alloc] init];
UINavigationController *settingsNav = [[UINavigationController alloc] initWithRootViewController:settings];
[navigationController presentModalViewController:settingsNav animated:YES];
[navigationController dismissModalViewControllerAnimated:YES];

谢谢!

最佳答案

如果您尝试将过多的导航动画放置得太近,它们通常不会起作用。尝试在 0.75 秒延迟后执行您的dismissModalViewControllerAnimated:。

关于iphone - 解雇ModalViewControllerAnimated 并不总是有效?,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/2024571/

10-12 12:49