gpt4 book ai didi

ios - 如何导航回上一个 View

转载 作者:行者123 更新时间:2023-11-28 21:49:06 25 4
gpt4 key购买 nike

当用户点击 TableViewController 中的一行时。我想选择该 View 的内容,用户应该导航回上一个屏幕。

我该怎么做。

- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {

// How to navigate back to the previous view ?

}

请注意,这是一个基于Navigation Controller 的应用程序。

最佳答案

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:`(NSIndexPath *)indexPath {`
[self.navigationController popToRootViewControllerAnimated:YES];
}

关于ios - 如何导航回上一个 View ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28982532/

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