You can unregister a UICollectionView supplementary view by re-registering it with nil class as stated in Apple’s docs. (Remember to use the same reuseIdentifier).

[self.collectionView registerClass:nil
        forSupplementaryViewOfKind:UICollectionElementKindSectionHeader
               withReuseIdentifier:kHEADER_IDENTIFIER];

But don’t forget to overwrite the [UICollectionViewDelegateFlowLayout collectionView:layout:referenceSizeForHeaderInSection:]

- (CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout referenceSizeForHeaderInSection:(NSInteger)section
{
    return CGSizeZero;
}

Header or footer, depending on your need.

Rendering enums in SwiftUI

Enums are an excellent way to leverage Swift's value-types and immutability principles for handling states. Imagine you have a view that …… Continue reading

Using native and non-native animations together

Published on November 11, 2019

Rogue Bit 🕹

Published on October 31, 2019