Stack Overflow Asked by Catas on November 5, 2020
For some reason this code:
self.navigationController?.pushViewController(vc, animated: true)
Is behaving the exact same way as:
self.navigationController?.pushViewController(vc, animated: false)
The behavior is a non-animated push. I am not sure why the animation parameter is no longer functioning. It worked properly in iOS 13. Is this a bug?
Upon further research, I also noticed that in viewWillAppear
, ViewWillDisappear
, and ViewDidAppear
that the animated
property is false. Overriding the functions with:
super.viewWillAppear(true)
does not make any difference.
For further context, I am using a UIViewControllerRepresentable
that displays a UITabBarController
that contains a NavigationController
inside of it. The view in the UINavigationController
, and all of the pushed views, are where I am experiencing this issue.
Fixed my problem!
Turns out that in my UITabBarController
I had this line of code in my viewDidAppear
function:
super.viewWillAppear(animated)
instead of viewDidAppear
! As a result, the nested UINavigationController
had animations off. Unsure why this worked in iOS 13, but it shouldn't have!
Key takeaway: remember to properly override your viewWillAppear
and viewDidAppear
functions!
Going to keep this in here in case someone else runs into this issue.
Correct answer by Catas on November 5, 2020
1 Asked on February 16, 2021 by paritosh-m
1 Asked on February 16, 2021 by orest
2 Asked on February 16, 2021 by suryansh-mathur
3 Asked on February 16, 2021 by lix
2 Asked on February 16, 2021 by mach2
1 Asked on February 16, 2021 by nickponline
2 Asked on February 16, 2021 by gary-kephart
2 Asked on February 15, 2021 by gabriel-gonzalez
2 Asked on February 15, 2021 by drillfreak100
1 Asked on February 15, 2021 by eng-samer-t
android android appbarlayout android collapsingtoolbarlayout android layout android toolbar
2 Asked on February 15, 2021 by rajitha-perera
2 Asked on February 15, 2021 by user14391700
1 Asked on February 15, 2021 by sankrish
1 Asked on February 15, 2021 by peter-penzov
oauth 2 0 spring spring boot spring security spring security oauth2
4 Asked on February 15, 2021 by how
1 Asked on February 15, 2021 by riccardom
android firebase firebase cloud messaging notifications xamarin
Get help from others!
Recent Questions
Recent Answers
© 2023 AnswerBun.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP