SkillAgentSearch skills...

EPSCollectionViewFormLayout

A UICollectionView layout for creating forms.

Install / Use

/learn @ElectricPeelSoftware/EPSCollectionViewFormLayout
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

EPSCollectionViewFormLayout

EPSCollectionViewFormLayout is a subclass of UICollectionViewLayout that makes it easy to layout forms, like login and address forms, in a collection view.

Address Example Login Example

For an example of how to use EPSCollectionViewFormLayout, see the example project.

When using EPSCollectionViewFormLayout, each section in the collection view is laid out in one row. Your collection view’s delegate must implement the two methods in the EPSCollectionViewFormLayoutDelegate protocol:

- (CGFloat)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout heightForSectionAtIndex:(NSInteger)section;

- (CGFloat)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout relativeWidthOfItemAtIndexPath:(NSIndexPath *)indexPath;

The widths returned in collectionView:layout:relativeWidthOfItemAtIndexPath: are relative to the width of the collection view, so returning 0.5 would make the cell at that indexPath be half the width of the collection view.

View on GitHub
GitHub Stars13
CategoryDevelopment
Updated10y ago
Forks0

Languages

Objective-C

Security Score

75/100

Audited on Dec 4, 2015

No findings