Reputation: 6541
I have developed one application with deployment target and ios sdk as 6.0. Later my client demanded the app should run in ios 5.0+ devices.So i have changed deployment target to 5.0 and disabled autolayout property of IB as mentioned here in stack, but now iam getting the error as shown below:
> -[UIBarButtonItem setBackgroundImage:forState:style:barMetrics:]: unrecognized selector sent to instance 0x2971f0
And i didn't find anything wrong with my UIBarButtonItem,
addButton = [[UIBarButtonItem alloc]
initWithBarButtonSystemItem:UIBarButtonSystemItemAdd
target:self
action:@selector(addProject)];
now iam struggling to find a solution, waiting for your valuable help.. thanks in advance.
Upvotes: 1
Views: 698
Reputation: 31311
setBackgroundImage:forState:barMetrics:
is available in iOS 5.0+ but setBackgroundImage:forState:style:barMetrics:
is only available in iOS 6.0+
Upvotes: 2