MMKPlacemarkAnimation

@interface MMKPlacemarkAnimation : NSObject

Provides an interface to load and control animation of placemark.

Summary

Instance methods

- (void)setIconWithImage:(nonnull id<MRTAnimatedImageProvider>)image
                   style:(nonnull MMKIconStyle *)style;

Sets the animated image and icon style

- (void)setIconWithImage:(nonnull id<MRTAnimatedImageProvider>)image
                   style:(nonnull MMKIconStyle *)style
                callback:(nonnull MMKCallback)callback;

Sets the animated image and icon style

- (void)setIconStyleWithStyle:(nonnull MMKIconStyle *)style;
Changes the icon style

- (void)play;
Starts animation

- (void)playWithCallback:(nonnull MMKCallback)callback;
Starts animation and handles the callback

- (void)resume;
Resumes paused animation

- (void)stop;
Stops animation

- (void)pause;
Pauses animation

Properties

@property (nonatomic, assign, unsafe_unretained, readwrite, getter=isReversed)
    BOOL reversed;

If true, animation will be played in the reverse direction

@property (nonatomic, readonly, getter=isValid) BOOL valid;
Tells if this object is valid or no

Instance methods

setIconWithImage:style:

- (void)setIconWithImage:(nonnull id<MRTAnimatedImageProvider>)image
                   style:(nonnull MMKIconStyle *)style;

Sets the animated image and icon style. The new animation will be in the paused state.


setIconWithImage:style:callback:

- (void)setIconWithImage:(nonnull id<MRTAnimatedImageProvider>)image
                   style:(nonnull MMKIconStyle *)style
                callback:(nonnull MMKCallback)callback;

Sets the animated image and icon style. The new animation will be in the paused state.

Parameters

onFinished

is called when the icon is loaded.


setIconStyleWithStyle:

- (void)setIconStyleWithStyle:(nonnull MMKIconStyle *)style;

Changes the icon style.


play

- (void)play;

Starts animation. Removes the current play callback. Same as play(null).


playWithCallback:

- (void)playWithCallback:(nonnull MMKCallback)callback;

Starts animation and handles the callback.

Parameters

onFinished

is called when animation finishes and replaces the previous callback.


resume

- (void)resume;

Resumes paused animation. Callback (if any) is NOT removed.


stop

- (void)stop;

Stops animation. Animation returns to the initial paused state.


pause

- (void)pause;

Pauses animation.


Properties

reversed

@property (nonatomic, assign, unsafe_unretained, readwrite, getter=isReversed)
    BOOL reversed;

If true, animation will be played in the reverse direction. Default value is false.


valid

@property (nonatomic, readonly, getter=isValid) BOOL valid;

Tells if this object is valid or no. Any method called on an invalid object will throw an exception. The object becomes invalid only on UI thread, and only when its implementation depends on objects already destroyed by now. Please refer to general docs about the interface for details on its invalidation.