Reputation: 9049
-(void)fadeLabel{
UILabel *label = (UILabel *)[self.view viewWithTag:kLabelTag];
[UIView animateWithDuration:2.0
delay:0.0
options:UIViewAnimationCurveEaseIn
animations:^{
label.alpha = 0.0;
}];
}
My first attempt at animating anything has given me: Method '+animateWithDuration:delay:options:animations:' not found when trying to use animateWithDuration
I have no clue as to what is causing this error, but my code is the same as all the other tutorials and guides.
Thanks!
Upvotes: 3
Views: 1746
Reputation: 185761
The method is actually +animateWithDuration:delay:options:animations:completion:
. You're missing the completion:
bit. You can just pass nil
to that argument if you don't need a completion block.
Upvotes: 5