10

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?

1
  • 3
    did you include (aka import) SecViewController.h ?
    – giorashc
    May 3, 2012 at 8:06

1 Answer 1

22

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.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.