我试过这段代码:
navigationController?.navigationItem.backBarButtonItem?.title = ""
但它不起作用,也没有改变任何东西.如何将backButton文本设置为空?
我试过这个代码用于后退按钮标题.它的工作正常
let barButton = UIBarButtonItem() barButton.title = "" self.navigationController?.navigationBar.topItem?.backBarButtonItem = barButton
self.navigationController!.navigationBar.topItem!.title = ""