We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
//返回头脚视图
(UICollectionReusableView *)collectionView:(UICollectionView *)collectionView viewForSupplementaryElementOfKind:(NSString *)kind atIndexPath:(NSIndexPath *)indexPath{ if ([kind isEqualToString:UICollectionElementKindSectionHeader]) { // CollectionHeaderAndFooterView *headerView = [collectionView dequeueReusableSupplementaryViewOfKind:UICollectionElementKindSectionHeader withReuseIdentifier:@"sectionHeader" forIndexPath:indexPath]; // headerView.titleLabel.text = @"头视图"; // headerView.titleLabel.backgroundColor = [UIColor orangeColor]; // return headerView; return nil;
}else{ CollectionHeaderAndFooterView *footerView = [collectionView dequeueReusableSupplementaryViewOfKind:UICollectionElementKindSectionFooter withReuseIdentifier:@"sectionFooter" forIndexPath:indexPath]; footerView.titleLabel.text = @"脚视图"; footerView.titleLabel.backgroundColor = [UIColor cyanColor]; return footerView;
} }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
//返回头脚视图
(UICollectionReusableView *)collectionView:(UICollectionView *)collectionView viewForSupplementaryElementOfKind:(NSString *)kind atIndexPath:(NSIndexPath *)indexPath{
if ([kind isEqualToString:UICollectionElementKindSectionHeader]) {
// CollectionHeaderAndFooterView *headerView = [collectionView dequeueReusableSupplementaryViewOfKind:UICollectionElementKindSectionHeader withReuseIdentifier:@"sectionHeader" forIndexPath:indexPath];
// headerView.titleLabel.text = @"头视图";
// headerView.titleLabel.backgroundColor = [UIColor orangeColor];
// return headerView;
return nil;
}else{
CollectionHeaderAndFooterView *footerView = [collectionView dequeueReusableSupplementaryViewOfKind:UICollectionElementKindSectionFooter withReuseIdentifier:@"sectionFooter" forIndexPath:indexPath];
footerView.titleLabel.text = @"脚视图";
footerView.titleLabel.backgroundColor = [UIColor cyanColor];
return footerView;
}
}
The text was updated successfully, but these errors were encountered: