Reputation: 239
i'm working on a static library, where i need to have access to self.view i'm trying to give the caller a reference to self.view by letting him pass it as a parameter
in the header file the .h
- (void) myM:(UIView *)myView;
but this is giving me an error:
expected a type
please can anyone help,
Thank you
Upvotes: 2
Views: 226
Reputation: 104708
Just add a forward declaration to your header:
@class UIView;
if you need to use the view, add this to your .m file:
#import <UIKit/UIKit.h>
Upvotes: 1
Reputation: 34912
Looks like you just need to import the UIKit headers. Add this at the top of your header file:
#import <UIKit/UIKit.h>
Upvotes: 2