aldominium aldominium - 2 years ago 185
Swift Question

Add button at the end of collection view in storyboard

I have a

in a storyboard. I know how to add cells and modify them but for some reason I can't add any other view or UI element after my

Is there a way to do this in the storyboard? If not how can I do this programmatically?

Answer Source

In storyboard you can enable it by selecting the radio button title "Section Footer", for your UICollectionView and then by dragging UIButton there. You can also override this function:

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

You may also need to set Footer's reference size if you are UICollectionViewFlowLayout

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download