首页 > 其他 > 详细

UITableView选择某一行常用做法

时间:2015-03-18 10:32:39      阅读:299      评论:0      收藏:0      [点我收藏+]
#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选择某一行常用做法

原文:http://blog.csdn.net/marvindev/article/details/44406631

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!