Protocol

UIDynamicItem

To make a custom object eligible to participate in UIKit Dynamics, adopt the UIDynamicItem protocol in the object’s class.

Overview

Starting in iOS 7, the UIView and UICollectionViewLayoutAttributes classes implement this protocol.

Symbols

Participating in Dynamic Animation

var bounds: CGRect
Required.

Called when a dynamic animator needs the bounds of the dynamic item.

var center: CGPoint
Required.

The center point of the dynamic item.

var transform: CGAffineTransform
Required.

The rotation of the dynamic item.

var collisionBoundsType: UIDynamicItemCollisionBoundsType

The type of collision bounds associated with the item.

var collisionBoundingPath: UIBezierPath

The path-based shape to use for the collision bounds.

Constants

UIDynamicItemCollisionBoundsType

Constants that indicate the shape of the item’s collision bounds.