I have a universal app and for each device (iPad, iPhone) have different sets of properties like this:
//iPhone
@property (nonatomic, strong) CategoriesViewController *categoriesViewController;
//iPad
@property (nonatomic, strong) UIPopoverController *categoriesPopoverController;
But I don't want to waste memory synthesizing properties for each device. Like in my case when user opens app with iPhone, only iPhone specific @properties should be created. Also wice-versa for app running on iPad.
Is there any directive in compile time to defer this, something like that:
#if UI_USER_INTERFACE_IDIOM() = iPhone
//create iPhone properties
#elseif UI_USER_INTERFACE_IDIOM() = iPad
//create iPad properties
Is there any way to do this or is there a better way to handle this?
Thanks!