问题
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