我有Split View Controller。 我想在swift上改变动作后退按钮。 我做了什么?
答案 0 :(得分:1)
试试这个:
override func viewDidLoad() {
super.viewDidLoad()
var button = UIBarButtonItem(title: "YourNewButton", style: UIBarButtonItemStyle.Bordered, target: self, action: "doSomething")
self.navigationItem.leftBarButtonItem = button
}
func doSomething()
{
//do something
var vc = YourDestinationViewController()
self.presentViewController(vc, animated: true, completion: nil)
}