More Related Content Similar to CoreAnimator par Clément Sauvage (20) More from CocoaHeads France (20) CoreAnimator par Clément Sauvage3. Iworkat
Founder of creative agency Kalokod
(Mostly mobile Web consulting)
© Clément Sauvage & Kalokod SAS - Cocoaheads Paris - 03-12-2015
7. - (void) anim1 {
[UIView beginAnimations:nil context:nil];
[UIView setAnimationCurve:UIViewAnimationCurveLinear];
[UIView setAnimationDuration:0.3];
[UIView setAnimationDelegate:self];
if(someConditions) {
[UIView setAnimationDidStopSelector:@selector(anim2)];
} else {
[UIView setAnimationDidStopSelector:@selector(anim3)];
}
// Animations
[UIView commitAnimations];}
© Clément Sauvage & Kalokod SAS - Cocoaheads Paris - 03-12-2015
8. - (void) someMethod {
//Some Fuck*** code
[self animateWithCompletionBlock:^{ [object1 removeFromSuperview]; }];
//More Fuck*** code
}
- (void) animateWithCompletionBlock:(void (^)(void))block {
[UIView animateWithDuration:0.5
delay:0.0
options:UIViewAnimationOptionCurveEaseInOut
animations:^{
// Coooooode
}
completion:^(BOOL finished) {
if(block != nil) {
block();
}}];
}
© Clément Sauvage & Kalokod SAS - Cocoaheads Paris - 03-12-2015
16. Andthen(inXCode)
#import "MyAnimationView.h"
//blah, blah, blah...
MyAnimationView *fuckingAwesomeAnimation = [[MyAnimationView alloc]init];
fuckingAwesomeAnimation.frame = CGRectMake(...);
[fuckingAwesomeAnimation addAnimationNameAnimation];
[self.view addSubview:fuckingAwesomeAnimation];
It works !
© Clément Sauvage & Kalokod SAS - Cocoaheads Paris - 03-12-2015
17. There's tons of tutorial on coreanimatorapp.com
© Clément Sauvage & Kalokod SAS - Cocoaheads Paris - 03-12-2015
19. Thanks to awesome guys @ PolishedPlay LLC
I've a redeem code for one of you.
© Clément Sauvage & Kalokod SAS - Cocoaheads Paris - 03-12-2015
20. And here comes ... the sorting hat
© Clément Sauvage & Kalokod SAS - Cocoaheads Paris - 03-12-2015
21. Well... Dumbledore refused to lend me, sooo it took...
TheGobletofFire
© Clément Sauvage & Kalokod SAS - Cocoaheads Paris - 03-12-2015