user1343911
user1343911

Reputation:

Expected a type error

So I created this method:

- (void)addToViewController:(SecViewController *)controller 
      didFinishEnteringItem:(NSString *)item;` <br>

And Xcode keeps giving me Expected a type error at SecViewController *. What does that mean? SecViewController is not a type?

Upvotes: 10

Views: 12168

Answers (1)

Nikolai Ruhe
Nikolai Ruhe

Reputation: 81868

You have to declare SecViewController:

@class SecViewController;

... at the top of your header.

Note: Don't just #import all used headers. This just worsens your header dependencies.

Upvotes: 22

Related Questions