gpt4 book ai didi

swift - 如何更改 UISplitViewController 中的后退按钮?

转载 作者:行者123 更新时间:2023-11-28 07:10:50 27 4
gpt4 key购买 nike

我有 Split View Controller 。我想快速更改操作后退按钮。我做什么?

image

最佳答案

试试这个:

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)
}

关于swift - 如何更改 UISplitViewController 中的后退按钮?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28544508/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com