How to remove all navigationbar back button title

后端 未结 30 3403
后悔当初
后悔当初 2020-12-12 15:42

When I push a UIViewController, it has some title in back button at new UIViewController, if the title has a lot of text, It does not look good in

30条回答
  •  南方客
    南方客 (楼主)
    2020-12-12 16:13

    Works on Swift 5:

            self.navigationItem.backBarButtonItem?.title = ""
    

    Please note it will be effective for the next pushed view controller not the current one on the display, that's why it's very confusing!

    Also, check the storyboard and select the navigation item of the previous view controller then type something in the Back Button (Inspector).

提交回复
热议问题