November 2013
Intermediate to advanced
576 pages
19h 3m
English
Collection views offer support for animations when items are being inserted or deleted. This animation is not demonstrated in the sample app, but can be covered with some discussion. To build support for animating insertions and deletions, there are a few methods in the collection view layout subclass to implement. First is the prepareForCollectionViewUpdates: method, which can be used for any preparation needed before animations occur. That method receives an array of updates that can be inspected so that the method can be customized to perform preparations by individual items and by type of update.
For insertions, the initialLayoutAttributesForAppearingItemAtIndexPath: method can be implemented. This method ...
Read now
Unlock full access