在以前版本中运行良好的漂亮基本代码已停止工作。在从核心数据获取中选择第一个或两个对象后,didSelectRowAtIndexPath停止响应。没有警告,错误或冻结,只是没有回应。没有视图委托的相同代码在iPhone上正常工作。任何帮助将不胜感激!
- (void)viewDidLoad
{
[super viewDidLoad];
self.title = self.payment.name;
self.paymentNameTextField.text = self.payment.name;
[paymentView setDelegate:self];
[paymentView setDataSource:self];
[self setupFetchedResultsController];
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
SimpleCell *cell = (SimpleCell *)[tableView dequeueReusableCellWithIdentifier:@"Cell"];
payment = [self.fetchedResultsController objectAtIndexPath:indexPath];
cell.nameBasicLabel.text =self.payment.name;
return cell;
}
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
self.payment = [self.fetchedResultsController objectAtIndexPath:indexPath];
self.paymentNameTextField.text = self.payment.name;
[self viewDidLoad];
}