Как вызвать функцию блокировки dispatch_block_t в отправителе кнопки? - PullRequest
0 голосов
/ 05 декабря 2018

Как я могу вызвать dispatch_block_t в кнопке отправителя?В настоящее время dispatch_block_t находится под HeadView и размещается под viewForSupplementaryElementOfKind.Пример кода, как показано ниже: -

    - (UICollectionReusableView *)collectionView:(UICollectionView *)collectionView viewForSupplementaryElementOfKind:(NSString *)kind atIndexPath:(NSIndexPath *)indexPath {

        UICollectionReusableView *reusableview = nil;

        if (kind == UICollectionElementKindSectionHeader){

            ProductMerchant_HeadView *headerView = [collectionView dequeueReusableSupplementaryViewOfKind:UICollectionElementKindSectionHeader withReuseIdentifier:ProductMerchant_HeadViewID forIndexPath:indexPath];

            WEAKSELF
            headerView.filterClickBlock = ^{ //Click on filter header
                //something here.....
            };
 reusableview = headerView;  
    }
    if (kind == UICollectionElementKindSectionFooter) {

    }
    return reusableview;
}


- (void)clickFilterButton:(id)sender {
//HOW CAN I CALL headerView.filterClickBlock = ^{} HERE?
}
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...