Black smudge under navigation controller when transitioning

情到浓时终转凉″ 提交于 2019-12-24 09:08:51

问题


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

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:


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.




回答2:


for me, It happens when I use ToolBar from libraries. fix by using ToolBar from the navigation controller itself by toggle "Shows Toolbar" in Navigation Controller's Attribute Inspector



来源:https://stackoverflow.com/questions/41842359/black-smudge-under-navigation-controller-when-transitioning

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!