gpt4 book ai didi

ios - UINavigationController "back button"自定义文本?

转载 作者:IT王子 更新时间:2023-10-29 07:26:57 27 4
gpt4 key购买 nike

默认情况下,UINavigationController 的“后退按钮”显示堆栈中最后一个 View 的标题。有没有办法在后退按钮中使用自定义文本?

最佳答案

来自 this link :

self.navigationItem.backBarButtonItem =
[[UIBarButtonItem alloc] initWithTitle:@"Custom Title"
style:UIBarButtonItemStylePlain
target:nil
action:nil];

正如泰勒在评论中所说:

don't do this in the visible view controller, but in the view controller that you'd see if you hit the back button

关于ios - UINavigationController "back button"自定义文本?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1441699/

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