I am adding a protocol to Prestented View Controller to establish a relationship between a Presenting View Controller and a Presented View Controller.
The current deployment target does not support automated __weak references
I have declared the protocol like following in the presented view controller (DistanceModalViewController.h):
@protocol DistanceModalViewControllerDelegate <NSObject>
-(void)dismissDistanceModalViewControllerWithData: (id) data;
@end
and in the interface (DistanceModalViewController.h):
@property (nonatomic, weak) id<DistanceModalViewControllerDelegate> delegate;
in the implementation I synthesize (DistanceModalViewController.m):
@synthesize delegate;
but I get the error above. I am targeting iPhone 5.1 Simulator.
I could understand the weak reference given me problems but on iOS5, I’m a little confused. What am I doing wrong?
thx
You mean you’ve selected that in the drop down menu in the toolbar? That’s not the deployment target, that’s the device you’re running the application on when you choose Product > Run. The fact that this particular device is running a high enough version of iOS is unimportant; if you’re targeting a lower version, it has to be able to run on lower versions as well. The deployment target is the platform you’re building for. In your build settings, check the entry iOS Deployment Target. This will let you target only iOS 5 and up.