I have an Xcode 4 project that builds up to two different goals. I defined some constants in the build settings so that I could run different codes for each goal, for example:
#ifdef VERSION1
In one version of the application, I need a main view controller to open another view controller and become its delegate, but another version does not use this view controller and should not compile its code or try to become its delegate. I set the title of the main view controller as follows:
#ifdef VERSION2 #import "SpecialViewController.h" #endif @interface MainViewController : UIViewController <MPMediaPickerControllerDelegate, SpecialViewControllerDelegate> { // etc.
The condition associated with the #import tag works fine, but how can I declare this class as SpecialViewControllerDelegate in one version, but not in another?
source share