In my application I am added two button at right of a UINavigationItem, its working fine on simulator, but when I testing it on device its gives me error of SIGABRT, along with unrecognized selector sent to NSArray
. I tried to add one button at right side, it was added successfully, and works fine on device as well. Here my question is, whats the problem?
I am adding right buttons using following code,
NSArray *buttons=[[NSArray alloc] initWithObjects:btnOne,btnTwo,nil]];
myNavItem.rightBarButtonItems=buttons; //Error on device, but works fine on simulator.
Please, point me what is I doing wrong? Thanks!