Hey guys I am having problems running your code on a CALayer sublayer in another class. I have:
Code:
- (void) fadeImageUp {
[UIView beginAnimations:nil context:nil];
[UIView setAnimationCurve:UIViewAnimationCurveEaseInOut];
[UIView setAnimationDuration:3.0];
[UIView setAnimationDelegate:self];
[UIView setAnimationDidStopSelector:@selector(fadeImageDown)];
mainview.theColorA.opacity = 1.0;
[UIView commitAnimations];
}
- (void) fadeImageDown {
[UIView beginAnimations:nil context:nil];
[UIView setAnimationCurve:UIViewAnimationCurveEaseInOut];
[UIView setAnimationDuration:1.0];
[UIView setAnimationDelegate:self];
[UIView setAnimationDidStopSelector:@selector(fadeImageUp)];
mainview.theColorA.opacity = 0.0;
[UIView commitAnimations];
}
My problem is when i set the delegate to self the app freezes. If I set it to anything else, it will only run the fadeup, but then never calls fade down. Know any way to fix this? The CALayer subview (theColorA) is in my custom view class 'mainview'
Any tips?