andreamazz / andreamazz/AMScrollingNavbar

Table view buttons and title disappears after going back from full screen presented controller

Aperta
#375 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Swift
Stelle
6k
Fork
628
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

**Describe the bug**
Table view buttons and title disappears after going back from full screen presented controller.

**To Reproduce**
- Start observing a collection view (or table view) scroll.
- Scroll to hide the nav bar
- Present a modal view controller with full screen
- Stop observing (in `viewWillDissapear`) **with `showingNavBar = false`**
- Dismiss the presented view controller
- The original controller has the nav bar displayed and all its items (title, buttons) are transparent.

You can also reproduce it by adding this code to `CollectionViewController.swift` in the demo app.

```
// line 38, replace commented line
// navigationController.stopFollowingScrollView()
navigationController.stopFollowingScrollView(showingNavbar: false)
```

```
// line 44, replace commented lines
// let storyBoard = UIStoryboard(name: "Main", bundle: nil)
// let mainViewController = storyBoard.instantiateViewController(withIdentifier: "TestViewController")
// self.present(mainViewController, animated: true, completion: nil)

let c = UIViewController()
c.modalPresentationStyle = .fullScreen
c.view.backgroundColor = .red
present(c, animated: true)
Timer.scheduledTimer(withTimeInterval: 2, repeats: false) { _ in
c.dismiss(animated: true, completion: nil)
}
```
**Expected behavior**
- The nav bar should remain hidden or at least visible with all this items

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.