Как я могу вызвать 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?
}