3

I use this code to make my navigation bar transparent to make the background image continue to whole screen:

navigationController?.navigationBar.setBackgroundImage(UIImage(), forBarMetrics: UIBarMetrics.Default)
    navigationController?.navigationBar.shadowImage = UIImage()
    navigationController?.navigationBar.translucent = true

then when I add bar button to my navigation bar, buttons are also becomes transparent. But I don't want my buttons to be transparent. How can I solve this problem?

Nayan
  • 3,014
  • 2
  • 17
  • 33
berkt
  • 99
  • 1
  • 8
  • These links might help 1.[transparent navigation bar ios](http://stackoverflow.com/a/35282448/452708), 2[Make navigation bar transparent regarding below image in iOS 8.1](http://stackoverflow.com/questions/27708943/make-navigation-bar-transparent-regarding-below-image-in-ios-8-1) – Abhijeet Mar 11 '16 at 11:42

1 Answers1

0

Choose one of the init options which allows you to customise the button contents, like initWithCustomView: or initWithImage:style:target:action:.

Wain
  • 118,658
  • 15
  • 128
  • 151