与NSUserDefaults + NSCoder对象争论

时间:2014-03-16 10:56:40

标签: ios segue nscoder nskeyedunarchiver

- (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;

但是如果我在调试器上“继续”,一切都会正常工作 - 该应用程序似乎正挂在这一行......

我认为这与NSCoder的NSUserDefaults中的对象有关...

如何才能使应用程序不会崩溃?!

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

1 个答案:

答案 0 :(得分:1)

只是澄清,

您是自己创建断点还是由调试器自动处理?

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