-1

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.

Miriam Farber
  • 18,986
  • 14
  • 61
  • 76
Zain Ul Abideen
  • 693
  • 10
  • 15

2 Answers2

1

Don't worry copy pasting will work.

// Remove Bottom Shadow
UINavigationBar.appearance().shadowImage = UIImage()
UINavigationBar.appearance().setBackgroundImage(UIImage(), for: .default)
Rajeev Udayan
  • 310
  • 2
  • 4
0

Please check :

self.navigationController?.navigationBar.shadowImage = UIImage()
Vini App
  • 7,339
  • 2
  • 26
  • 43