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?