andreamazz / andreamazz/AMScrollingNavbar

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

未关闭
#375 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
Swift
星标
6k
派生
628
PR 合并指标
30 天内没有已合并 PR

描述

**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

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。