Black smudge under navigation controller when tran

2019-09-08 09:12发布

When I'm tabbing between pages attached to a navigation controller, sometimes there is a black mark under the navigation bar..

enter image description here

any ideas how to remove this?

they're just blank pages.

let vc = self.storyboard!.instantiateViewController(withIdentifier: page)
            self.show(vc, sender: self)

i have tried setting background to white in navigation controller class like some threads recommend which didn't do anything.

1条回答
啃猪蹄的小仙女
2楼-- · 2019-09-08 09:46

The "smudge" happens when you transition between a view controller whose edgesForExtendedLayout include .top and one that does not. To avoid it, make sure all your view controllers have the same edgesForExtendedLayout and the same extendedLayoutIncludesOpaqueBars settings.

查看更多
登录 后发表回答