AnswerBun.com

pushViewController & popViewController animation no longer functioning in iOS 14

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.

One Answer

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

Add your own answers!

Related Questions

how to count number of file with a matching pattern using python

2  Asked on February 16, 2021 by suryansh-mathur

 

R First Row By Group When Condition Is Met

4  Asked on February 16, 2021 by bvowe

   

C++ program won’t print anything with vectors?

2  Asked on February 16, 2021 by luckylone-official

 

What is damping for?

3  Asked on February 16, 2021 by lix

       

Spring 5 MVC not finding mapping to controller returning JSON

2  Asked on February 16, 2021 by gary-kephart

   

Pointer value in c

3  Asked on February 15, 2021 by gsoap

 

Memory allocation of map[int]interface{} vs map[int]struct{}

2  Asked on February 15, 2021 by gabriel-gonzalez

   

Does the “leftmost prefix rule” of Index applies to SQL Server?

2  Asked on February 15, 2021 by drillfreak100

   

How to add ArrayList to JsonObject in Kotlin

2  Asked on February 15, 2021 by rajitha-perera

   

How to get data from axios request?

1  Asked on February 15, 2021 by theyaxxe

   

Ask a Question

Get help from others!

© 2023 AnswerBun.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP