当我将viewController推送到navigationController时,我想从下到上显示动画?有人知道吗?
RegisterViewController *registerView = (RegisterViewController *)[self.storyboard instantiateViewControllerWithIdentifier:@"RegisterViewController"];
现在
[self presentViewController:registerView animated:YES completion:nil];
关闭
[self dismissViewControllerAnimated:YES completion:nil];
有什么方法可以在navigationController中实现这一点吗?
最佳答案
不要链接 Storyboard
Present ViewController with this code
它将从下到上呈现
UIViewController *vc = [self.storyboard instantiateViewControllerWithIdentifier:@"MYUnicornViewController"]; // Change the view controller name
[self.navigationController presentViewController:vc animated:YES completion:nil];
Dismiss ViewController with this code
它将从上到下关闭
[self.navigationController dismissViewControllerAnimated:YES completion:nil];
关于ios - 我如何在导航 Controller 中从下到上呈现/关闭 View Controller ?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38697989/