次のような小さなフィードバックのためにタップされたときに UITableViewCell を更新しようとしています:
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
if ([[self.menuItems objectAtIndex:aPath.row] isEqualToString:@"AirPrint Order"]) {
UITableViewCell *cell = (UITableViewCell *)[tableView cellForRowAtIndexPath:indexPath];
cell.textLabel.text=@"Generating Order Receipt";
NSArray *nsa = [[NSArray alloc] initWithObjects:indexPath, nil];
[tableView reloadRowsAtIndexPaths:nsa withRowAnimation:UITableViewRowAnimationNone];
}
}
このコードは、デバッガーで if ステートメント内に作成しても何もしないように見えますが、セル テキストでは何も起こりません。