【发布时间】:2018-12-29 01:14:16
【问题描述】:
伙计们,我想从 Back 按钮中删除文本。 我使用此代码从 VC1 导航到 VS2(登录表单)。我试图将此代码添加到 VC2 但没有。
self.navigationController?.navigationBar.backItem?.title = ""
代码:
@IBAction func didSelectSegment(_ sender: UISegmentedControl) {
let vcName = vcNames[sender.selectedSegmentIndex]
if vcName == "NQTPastRecordViewController" && loggined() == false {
let alert = alertAskLogin({
let signInVC = getController("EVSignInViewController")
self.navigationController?.pushViewController(signInVC, animated: true)
})
self.present(alert, animated: true, completion: nil)
segmentControll.selectedSegmentIndex = 0
return
}
self.container.swipeToController(at: sender.selectedSegmentIndex)
}
【问题讨论】:
标签: swift navigation title back-button