iphone - compiler conditional on header
- by Mike
I have a project that generates applications for two targets.
One of the targets has to include one additional delegate protocol that should not be present on the other one. So, I have created a macro on Xcode and declared the header like this:
#ifdef TARGET_1
@interface myViewController : UIViewController <UIScrollViewDelegate, UIPopoverControllerDelegate>
#endif
#ifdef TARGET_2
@interface myViewController : UIViewController <UIScrollViewDelegate>
#endif
{ .... bla bla.... }
The problem is that Xcode is not liking this "double" declaration of @interface and is giving me all sort of problems.
How to solve that? thanks for any help.