标签:uitableview ios开发 高性能 uitableviewcell 苹果
#pragma mark - Table view delegate
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
NSArray *visibleIndexPaths = [tableView indexPathsForVisibleRows];
for (NSIndexPath *ip in visibleIndexPaths) {
UITableViewCell *clearCell = [tableView cellForRowAtIndexPath:ip];
[clearCell setAccessoryType:UITableViewCellAccessoryNone];
}
UITableViewCell *cell = [tableView cellForRowAtIndexPath:indexPath];
[cell setAccessoryType:UITableViewCellAccessoryCheckmark];
[self.delegate chooserSelectedFriend:[self.friendList objectAtIndex:indexPath.row]];
[self.navigationController popViewControllerAnimated:YES];
}
标签:uitableview ios开发 高性能 uitableviewcell 苹果
原文地址:http://blog.csdn.net/marvindev/article/details/44406631