zoukankan      html  css  js  c++  java
  • 将TableView的中的Label和Cell行数绑定

        [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];
            }
        }
        
    }

     
  • 相关阅读:
    [LeetCode] 22. Generate Parentheses
    3. Longest Substring Without Repeating Characters
    Python floor() 函数
    Python fabs() 函数
    Python exp() 函数
    Python cmp() 函数
    Python ceil() 函数
    小样本学习综述
    如何评估两张图片的差异
    网络模型mAP计算实现代码
  • 原文地址:https://www.cnblogs.com/i0ject/p/4033085.html
Copyright © 2011-2022 走看看