ios - dismissViewControllerAnimated : not animating

标签 ios objective-c uiviewcontroller

我正在使用 SVWebViewController .当我在这里展示 View Controller 时

SVModalWebViewController *webViewController = [[SVModalWebViewController alloc] initWithAddress:address];
webViewController.webDelegate = self;

[self presentViewController:webViewController animated:YES completion:nil];

View Controller 如预期的那样从底部向上滑动。然而,当 View Controller 被关闭时,调用

[self dismissViewControllerAnimated:YES completion:nil];

View Controller 就这样消失了。没有向下滑动动画。有什么想法吗?

编辑 事实证明很多演示动画在应用程序中没有正确显示。导航 Controller 上的一些插入不会滑入或滑出(但有些是)。它们只是出现了。

最佳答案

[self dismissViewControllerAnimated:YES completion:NULL]; 

这应该在 SVModalWebViewController 而不是 SVWebViewController 中

编辑:您应该推送而不是模式化地转到 SVWebViewController:

SVWebViewController *webViewController = [[SVWebViewController alloc] initWithAddress:@"http://google.com"];
[self.navigationController pushViewController:webViewController animated:YES];

而不是解雇你应该:

[self.navigationController popViewControllerAnimated:YES];

关于ios - dismissViewControllerAnimated : not animating,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17635147/

相关文章:

iphone - 仅为一个 View Controller 从静态库维护 iOS 纵向方向

ios - 如何在 iOS Swift 中向多个 ViewController 添加一个公共(public) View ?

ios - 转换为 swift 3 后,Tests.swift 文件中没有这样的模块 'Firebase'

iphone - 在 NSArray 中的字符串中搜索关键字

ios - 如何在设备上流畅地进行连续的 Action 过程? (GCD)

objective-c - 如何将视频(图像)输入与外部源同步?

ios - 如何避免不得不一遍又一遍地重新创建对象?

ios - 在 SWIFT 中的不同 View 之间切换

ios - 如何在 iOS 中使用启动图像时缩小状态栏

iOS8 在不使用 UINavigationBar 的情况下更改状态栏颜色