Custom back button in UINavigationController

前端 未结 10 1821
伪装坚强ぢ
伪装坚强ぢ 2020-12-28 16:59

For an application I\'m developing, I need to display a custom back button in a navigation bar. I have the button asset as a PNG image, and I\'m writing this code:



        
10条回答
  •  既然无缘
    2020-12-28 17:39

    Confusingly backBarButtonItem is not what you're looking for.

    It just controls the title on the back button for the next view controller. What you want is to set the leftBarButtonItem to your custom back button.

提交回复
热议问题