UIDynamicItem Protocol Reference

Adopted by
Conforms to
Framework
/System/Library/Frameworks/UIKit.framework
Availability
Available in iOS 7.0 and later.
Declared in
UIDynamicBehavior.h

Overview

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

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

Tasks

Participating in Dynamic Animation

Properties

bounds

Called when a dynamic animator needs the bounds of the dynamic item. (required) (read-only)

@property(nonatomic, readonly) CGRect bounds
Availability
  • Available in iOS 7.0 and later.
Declared In
UIDynamicBehavior.h

center

The center point of the dynamic item. (required)

@property(nonatomic, readwrite) CGPoint center
Discussion

The dynamic animator (that the item is associated with) calls this method when it has computed a new center point for the item.

Availability
  • Available in iOS 7.0 and later.
Declared In
UIDynamicBehavior.h

transform

The rotation of the dynamic item. (required)

@property(nonatomic, readwrite) CGAffineTransform transform
Discussion

UIKit Dynamics makes use only of the rotation value in this property.

The dynamic animator (that the item is associated with) calls this method when it has computed a new rotation value for the item.

Availability
  • Available in iOS 7.0 and later.
Declared In
UIDynamicBehavior.h