Skip to content

Latest commit

 

History

History
26 lines (21 loc) · 732 Bytes

README.md

File metadata and controls

26 lines (21 loc) · 732 Bytes

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 = ^{
    
};