0

So I have a navigation controller for which I want the navigation bar to be transparent. I accomplish this with an extension on UINavigationController:

extension UINavigationController {
    func setNavigationBarTransparent(transparent: Bool) {
        self.navigationBar.setBackgroundImage(UIImage(), forBarMetrics: UIBarMetrics.Default)
        self.navigationBar.shadowImage = UIImage()
        self.navigationBar.translucent = true
    }
}

This works perfectly when the app opens, and when it presents another navigation controller which has its navigation bar hidden in the same way. However, only when the root navigation controller (the window's root view controller) pushes another view controller, a shadow appears behind the navigation bar and won't disappear until it presents another navigation controller. Where is this shadow coming from? And how can I get rid of it? Thanks in advance!

AttilaTheFun
  • 701
  • 2
  • 11
  • 19
  • As discussed here? http://stackoverflow.com/questions/22413193/dark-shadow-on-navigation-bar-during-segue-transition-after-upgrading-to-xcode-5 – matt Apr 28 '16 at 02:36
  • @matt that was a different issue, but as mentioned below the issue only seems to appear in the iOS simulator and not on device. – AttilaTheFun Apr 28 '16 at 02:42
  • Cool. It's just that I vaguely remembered there's been a history of weird shadows in navigation bars... :) – matt Apr 28 '16 at 03:08

1 Answers1

0

Actually, after testing on device i have been unable to replicate the issue. It appears to be a bug on the iOS simulator which is not present on device.

AttilaTheFun
  • 701
  • 2
  • 11
  • 19