presentViewController from UINavigationController's childViewController (Animation issue)

懵懂的女人 提交于 2019-12-24 16:17:36

问题


I am having some weird animation issues. I called presentViewController with animation set to YES but the animation is not present when the view controller is being presented. And the weirdest thing is all animations throughout the app are gone!

So basically my setup is like this

UINavigationController has child view controller - childVC

I have childViewController to call presentViewController - presentVC and have a delegate callback method for childViewController to dismiss presentVC.

One interesting thing I found is this

[childVC presentViewController: presentVC];
NSLog(@"%@", [presentVC presentingViewController]); <- this prints UINavigationController!

Shouldn't it prints childVC? I am really confused with why it prints the parentController of the childVC instead.

I have been stuck on this weird animation issue for a very long time. I wonder if the presentingViewController being the UINavigationController have something to do with it?

Thoughts?

/* edited */ another thing I forgot to mention is that, childVC is part of the subclass of ECSlidingViewController, (meaning it childVC is one of the topViewController, underleftViewController or underRightViewController) if that makes any difference.

来源:https://stackoverflow.com/questions/20931547/presentviewcontroller-from-uinavigationcontrollers-childviewcontroller-animati

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