enesefuu
enesefuu

Reputation: 409

UICollectionView navigation bar flashes

I have this weird behavior with my UICollectionview where, briefly during the initial load, the navigation bar expands into the view and then disappears.

  1. The collection view has been added to the view and the first cell added. The first cell is always this static "New Game" button.
  2. The collection view is working on adding in the other elements. These are loaded from local storage, and a cell is added for each game that is found.
  3. Between adding the "new game" cell and pulling in the game cells, the navigation bar shows up.

Any ideas what could be going on here? Happy to share more information; just let me know what is relevant!

Upvotes: 0

Views: 343

Answers (1)

ndmeiri
ndmeiri

Reputation: 5029

As per our discussion in the comments, you are hiding the navigation bar in viewDidAppear.

self.navigationController?.isNavigationBarHidden = true

You should instead hide the navigation bar before the view appears, in viewWillAppear.

Upvotes: 1

Related Questions