Reputation: 349
I'm trying to call a function called animateRight in a file called ScanAnimation.m from SecondViewController.m.
In the top of SecondViewController.m I have:
ScanAnimation * Animation = [[ScanAnimation alloc] init];
and I make the call with:
[Animation animateRight];
and I get the error:
'ScanAnimation' undeclared
What am I doing wrong?
Upvotes: 0
Views: 261
Reputation: 2859
You need to import the ScanAnimation header file into the file you are making the call in.
So in the SecondViewController.m you would add #import "ScanAnimation.h"
at the top under #import "SecondViewController.h"
Upvotes: 1