O'Reilly logo

iOS Components and Frameworks: Understanding the Advanced Features of the iOS SDK by Joe Keeley, Kyle Richter

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating Custom Layouts

Custom layouts can be created for collection views that do not fit well into a grid format. In the sample app tap Custom Layout from the main menu to see an example of a layout that is more complex than a grid format. This layout presents images from the photo library in a continuous sine curve, even between section breaks as shown in Figure 20.10.

Image

Figure 20.10 Sample app: custom layout example.

To create a subclass of UICollectionViewLayout, several methods need to be implemented:

Image The collectionViewContentSize method ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required