gpt4 book ai didi

ios - 使用 NSUserDefaults + NSCoder 对象进行 Segue

转载 作者:行者123 更新时间:2023-11-29 03:09:01 25 4
gpt4 key购买 nike

- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
if ([[segue identifier] isEqualToString:@"ShowWordDetailsTwo"]) {
NSIndexPath *indexPath = nil;
Words *word = nil;
indexPath = [self.tableView indexPathForSelectedRow];
word = [myFavsTwo objectAtIndex:indexPath.row];

DetailsViewController *destViewController = segue.destinationViewController;
destViewController.word = word;
}
}

我在 segue 上遇到了崩溃——断点在:

     destViewController.word = word;

但如果我在我的调试器上“继续”,一切都会正常工作——应用程序似乎只是卡在这条线上...

我认为这与我的对象成为 NSUserDefaults 和 NSCoder 的一部分有关...

我怎样才能使应用程序不崩溃?!

我没有收到任何错误消息,只是一个断点错误

最佳答案

只是澄清一下,

断点是您自己创建的,还是由调试器自动创建的?

尝试禁用断点以查看它是否有效。

关于ios - 使用 NSUserDefaults + NSCoder 对象进行 Segue,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22435946/

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