当用户点击 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/