petecallaway.net - Pete Callaway's Blog

Description: Pete Callaway, freelance iOS developer. London, UK

Example domain paragraphs

This post will explain how to mimic the 'sticky' behaviour of UITableView headers using a UICollectionView . To do this we'll implement a subclass of UICollectionViewFlowLayout that we will then use to tweak the position of header views as the content scrolls.

Read more...

It's not uncommon to use a UICollectionView to show a grid of items in a view and use Interface Builder to configure it's to fit a particular phone width. Unfortunately we no longer have a single phone width to worry about and if we use this static layout on a wider iPhone such as an iPhone 6, the standard behaviour of a UICollectionViewFlowLayout is to increase the spacing between the cells. What is often prefferable is for the collection view's cell size to grow, leaving the gap the same across different