Да .. Это возможно .. У вас есть две опции
Вариант 1: Регистрация разных взглядов FOOTER
вид Регистрация колонтитул через код, используя различные идентификаторы повторного
registerClass:forSupplementaryViewOfKind:withReuseIdentifier:
Затем
- (UICollectionReusableView *)collectionView:(UICollectionView *)collectionView viewForSupplementaryElementOfKind:(NSString *)kind atIndexPath:(NSIndexPath *)indexPath
{
NSString *identifier = nil;
if ([kind isEqualToString:UICollectionElementKindSectionFooter]) {
if (indexPath.section == 0) {
identifier = @"footerViewOne";
}
else{
identifier = @"footerViewTwo";
}
}
UICollectionReusableView *supplementaryView = [collectionView dequeueReusableSupplementaryViewOfKind:kind withReuseIdentifier:identifier forIndexPath:indexPath];
return supplementaryView;
}
Вариант 2: Просто измените размер представления колонтитула
Для этого используйте UICollectionViewDelegateFlowLayout метод
- (CGSize)collectionView:(PSUICollectionView *)collectionView layout:(PSUICollectionViewLayout*)collectionViewLayout referenceSizeForFooterInSection:(NSInteger)section
{
if (section==0) {
return CGSizeMake(500, 50);
}
else
{
return CGSizeMake(200, 50);
}
}
круто, спасибо очень много. Я использовал второе решение (в UICollectionViewDelegateFlowLayout), и он отлично работает! –