3
-(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!

Adam
  • 8,849
  • 16
  • 67
  • 131

1 Answers1

5

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.

Lily Ballard
  • 182,031
  • 33
  • 381
  • 347