AWFDataAnimationDataSource
Objective-C
@protocol AWFDataAnimationDataSource <AWFAnimationDataSource>
Swift
protocol AWFDataAnimationDataSource : AWFAnimationDataSource
The AWFDataAnimationDataSource
is adopted by an object that provides the necessary data for an point-based
overlay to complete its animation.
-
Asks the data source for the data to be used for this animation. (required)
Declaration
Objective-C
- (nullable NSArray<id<AWFDataRepresentable>> *)dataObjectsForAnimation: (nonnull AWFAnimation *)animation;
Swift
func dataObjects(for animation: AWFAnimation) -> [AWFDataRepresentable]?
Parameters
animation
The animation object requesting the data
Return Value
An array of data items to use for the animation. These instances may vary depending on subclasses and what they expect to receive
-
Asks the data source if data needs to be requested for the animation.
Declaration
Objective-C
- (BOOL)shouldLoadDataForAnimation:(nonnull AWFAnimation *)animation;
Swift
func shouldLoadData(for animation: AWFAnimation) -> Bool
Parameters
animation
The animation requesting the data
Return Value
YES
if the data source needs to load data, otherwiseNO