Class

NSCollectionViewTransitionLayout

An object that implements custom behaviors when changing from one layout to another in a collection view.

Overview

Transition layout objects are commonly used to implement interactive transitions between layouts, where the transition itself is driven by a gesture recognizer.

Topics

Initializing the Transition Layout Object

init(currentLayout: NSCollectionViewLayout, nextLayout: NSCollectionViewLayout)

Initializes and returns the transition layout object.

Updating the Transition Information

var transitionProgress: CGFloat

The completion percentage of the transition.

func updateValue(CGFloat, forAnimatedKey: NSCollectionViewTransitionLayout.AnimatedKey)

Sets the value of a key whose value you use during the animation.

func value(forAnimatedKey: NSCollectionViewTransitionLayout.AnimatedKey)

Returns the most recently set value for the specified key.

Accessing the Layout Objects

var currentLayout: NSCollectionViewLayout

The collection view’s current layout object.

var nextLayout: NSCollectionViewLayout

The collection view’s new layout object.

Relationships

Conforms To

See Also

Layouts

class NSCollectionViewFlowLayout

A layout that organizes items into a flexible and configurable arrangement.

protocol NSCollectionViewDelegateFlowLayout

A set of methods that a delegate implements to provide layout information to a flow layout object in a collection view.

class NSCollectionViewGridLayout

A layout that displays a single section of items in a row and column grid.

class NSCollectionViewLayoutAttributes

An object that contains layout-related attributes for an element in a collection view.

class NSCollectionViewLayout

An abstract base class that you subclass and use to generate layout information for a collection view.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software