Apple has once again introduced a new class for developers to play with, the UICollectionView.    At the Omaha Mobile Meet-up Wednesday, February 5th, sponsored by CRi and Agape Red, Andy Peters of 1Password covered the basics as well as demonstrated examples of how the code worked.

Peters works with the 1Password team on their Mac and iOS app and has more than four years of experience in iOS development.  With his experience of working with this new class, he began the meet-up by describing the difference between UICollectionView and UITableView.

With UICollectionView, developers have the flexibility to customize and create grid-like layouts as opposed to the single-columned layout found in UITableView.  The UICollectionView is also comprised of three main components: cells, supplementary views and decoration views.  The cells in this class do not have a specific style and the supplementary views are commonly used as headers and footers.

“Don’t use a collection view when a table view is a better choice,” said Peters, giving general tips to keep in mind for UICollectionView and demonstrating the layout.

Andy Peters of 1Password demonstrating UICollectionView.

Andy Peters of 1Password demonstrating UICollectionView at the Omaha Mobile Meet-up at CRi.

After going through the basics, Peters dove into a demo of how the code works and errors to avoid.

“I definitely learned new pieces of information about UICollectionView that I didn’t think about or know before,” said Mark Corrado, Mobile App Developer at CRi.