gpt4 book ai didi

iphone - 移动到 UITableView 行选择的另一个 View

转载 作者:行者123 更新时间:2023-11-28 23:17:45 25 4
gpt4 key购买 nike

如何从当前 View 移动到另一个 View ?我当前的 View 是 viewcontroller,我想移动另一个 View Controller 。这是我的代码..

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
SecondView *secondView = [[SecondView alloc] initWithNibName:@"second" bundle:[NSBundle mainBundle]];
[self.navigationController pushViewController:secondView animated:YES];
}

我正在为另一个 View 使用 xib 文件。

最佳答案

确定nib文件名并设置bundle:nil

好的,请确保在您的第二个 View Controller 的界面构建器中,您正确地 Hook 了适当的类。

请清除所有目标,然后构建并运行应用程序。

关于iphone - 移动到 UITableView 行选择的另一个 View ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5231921/

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