我一直在创建一个项目,我收到了来自调试器的警告:
警告:在演示或关闭过程中尝试从视图控制器中关闭!
这是代码:
if (self.editHw)
{
if (self.homeworkEdit)
{
[self.homeworkEdit setValue:self.homeworkNameTF.text forKey:@"name"];
[self.homeworkEdit setValue:self.subject forKey:@"subject"];
[self.homeworkEdit setValue:self.dateDueLabel.text forKey:@"due_date"];
[self.homeworkEdit setValue:self.reminderDateLabel.text forKey:@"reminder_date"];
[self.homeworkEdit setValue:self.commentsTF.text forKey:@"comments"];
NSError *error = nil;
[context save:&error];
[self dismissViewControllerAnimated:YES completion:nil];
}
}
谁能告诉我错误是什么意思以及为什么会出现?如果您需要更多信息,请询问。