Skip to content

A lightweight class that supports block callbacks instead of CAAnimation delegates

License

Notifications You must be signed in to change notification settings

MartinMoizard/GSAnimationBlockDelegate

Repository files navigation

GSAnimationBlockDelegate

GSAnimationBlockDelegate is a lightweight library that enable the use of block instead of delegate method with CAAnimation

The blockOnAnimationSucceeded block is called instead of

- (void) animationDidStart:(CAAnimation *)theAnimation

and the blockOnAnimationSucceeded or blockOnAnimationFailed blocks are called instead of

- (void) animationDidStop:(CAAnimation *)theAnimation
                 finished:(BOOL)flag

depending on the flag value

It is licensed under the MIT License.

Usage

CAAnimation *animation = /* an animation */
 
GSAnimationBlockDelegate *delegate = [[GSAnimationBlockDelegate alloc] init];
delegate.blockOnAnimationSucceeded = ^{
    
};

About

A lightweight class that supports block callbacks instead of CAAnimation delegates

Resources

License

Stars

Watchers

Forks

Packages

No packages published