当我滚动 tabview 单元格时,复选标记被隐藏。我该怎么办?
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
[[tableView cellForRowAtIndexPath:indexPath] setSelected:NO];
FacebookFriend *friend = [self.fbFriendsFiltered objectAtIndex:indexPath.row];
// Build list to invite
if ( [self.fbFriendsInvited containsObject:friend.fid] ) {
[self.fbFriendsInvited removeObject:friend.fid];
NSLog(@"fbFriendsInvited:%@",self.fbFriendsInvited);
[[tableView cellForRowAtIndexPath:indexPath] setAccessoryType:UITableViewCellAccessoryNone];
} else {
//if ( [self.fbFriendsInvited count] >= kSelectionLimit )
// return;
[self.fbFriendsInvited addObject:friend.fid];
[[tableView cellForRowAtIndexPath:indexPath] setAccessoryType:UITableViewCellAccessoryCheckmark];
NSLog(@"fbFriendsInvited:%@",self.fbFriendsInvited);
}
}