gpt4 book ai didi

ios - 如何更改 initWithNibName 以供 Storyboard使用?

转载 作者:行者123 更新时间:2023-11-29 13:10:32 25 4
gpt4 key购买 nike

我正在使用来自 ray 的以下教程 http://www.raywenderlich.com/913/sqlite-101-for-iphone-developers-making-our-app

除了要从 didselectrow 填充的详细 View 之外,我正在让一切正常工作

这是他的东西

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
if (self.details == nil) {

self.details = [[[FailedBanksDetailViewController alloc] initWithNibName:@"FailedBanksDetailViewController" bundle:nil] autorelease];
}
FailedBankInfo *info = [_failedBankInfos objectAtIndex:indexPath.row];
_details.uniqueId = info.uniqueId;
[self.navigationController pushViewController:_details animated:YES];
[self performSegueWithIdentifier:@"testID" sender:self.view];
}

但是它不适用于 Storyboard

谁能帮帮我,我到处找答案!!!

最佳答案

目前您正在使用 Bob NIB 和 Storyboard的代码。选择 1 并坚持下去。如果您使用 Storyboard,只需执行 segue,然后处理 prepareForSegue:sender: 以配置目标 View Controller 。

关于ios - 如何更改 initWithNibName 以供 Storyboard使用?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17515201/

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