swift4xcode9xcode9-betaxcode9beta6

UINavigationBar.appearance().shadowImage = UIImage() in swift 4


How can I implement this code in swift 4 or xcode 9?

// Remove hairline between navigation bar and anything below such as search bar
UINavigationBar.appearance().shadowImage = UIImage()

I want to remove navBar underline.


Solution

  • Please check :

    self.navigationController?.navigationBar.shadowImage = UIImage()