码迷,mamicode.com
首页 > 其他好文 > 详细

将TableView的中的Label和Cell行数绑定

时间:2014-10-18 15:28:00      阅读:182      评论:0      收藏:0      [点我收藏+]

标签:io   ar   for   sp   div   on   cti   ad   bs   

    [cell.followBtn addTarget:self action:@selector(onFollowButtonsClickEvent:) forControlEvents:UIControlEventTouchUpInside];
    [cell.followBtn setTag:indexPath.row];
    
    UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(onUserClickEvent:)];
    cell.userHeadImageView.userInteractionEnabled = YES;
    cell.userHeadImageView.tag = indexPath.row;
    [cell.userHeadImageView addGestureRecognizer:tap];

 

 

#pragma mark Button event

- (void)onUserClickEvent:(id)sender{
    if ([sender isKindOfClass:[UITapGestureRecognizer class]]) {
        UIView *view = [(UITapGestureRecognizer*)sender view];
        NSInteger index = view.tag;
        if (index < self.followedDataArray.count) {
            ICUser *followedItem = (ICUser*)[self.followedDataArray objectAtIndex:index];
            [Go2PageUtility go2UserDetailController:self.navigationController withUserId:followedItem.userId];
        }
    }
    
}

 

将TableView的中的Label和Cell行数绑定

标签:io   ar   for   sp   div   on   cti   ad   bs   

原文地址:http://www.cnblogs.com/i0ject/p/4033085.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!