美文网首页
tableViewCell设置代理回调主VC

tableViewCell设置代理回调主VC

作者: 不要虚度美好的时光 | 来源:发表于2020-12-09 21:53 被阅读0次

    @protocol FisRodMallCellDelegate <NSObject>

    - (void)clickGoPayCellBtxMinus:(fishingRodStatus*)status withCount:(NSInteger)count;

    - (void)clickGoPayCellBtxPlus:(fishingRodStatus*)status withCount:(NSInteger)count;

    - (void)clickResetAllPayCell:(UIButton*)curBtn;

    - (void)clickSeeMallFishRodDetailsInfo:(fishingRodStatus*)status;

    - (void)vip8GoBuyClicked;

    @end

    @property (nonatomic, assign) id<FisRodMallCellDelegate> fisRodMallCellDelegate;

    - (void)setStatus:(fishingRodStatus *)status {

        _status = status;

    }

    - (IBAction)bgBtnSelectedStatusClicked:(UIButton *)sender {

        if (self.fisRodMallCellDelegate && [self.fisRodMallCellDelegate respondsToSelector:@selector(clickResetAllPayCell:)]) {

            [self.fisRodMallCellDelegate clickResetAllPayCell:_fishRodMallStatusBGBtn];

        }

    }

    VC:

    遵守协议:FisRodMallCellDelegate

    设置代理:

    - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {

        if (tableView == _fishingBackRewardTableView) {

            FishingBackRewardTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"FishingBackRewardTableViewCellID"];

            cell.backgroundColor=[UIColor clearColor];

            cell.selectionStyle = UITableViewCellSelectionStyleNone;

            fishBankStatus *status = _fishingHarvestInfo[indexPath.item];

            cell.fishingRewardCellDelegate = self;

            cell.status = status;

            return cell;

        }

    }

    - (void)clickResetAllPayCell:(UIButton *)curBtn {

    }

    相关文章

      网友评论

          本文标题:tableViewCell设置代理回调主VC

          本文链接:https://www.haomeiwen.com/subject/jkukgktx.html