I am developing one application. In that application i want to present a action sheet with options.
I written the following code for the action sheet requirement.
UIActionSheet *actionSheet = [[UIActionSheet alloc]initWithTitle:nil delegate:self cancelButtonTitle:@"Cancel" destructiveButtonTitle:nil otherButtonTitles:AALocalizedString(@"Capture Document", nil),AALocalizedString(@"Select Document", nil) ,AALocalizedString(@"Capture Photo", nil),AALocalizedString(@"Select Photo", nil),nil];
actionSheet.actionSheetStyle = UIActionSheetStyleDefault;
[actionSheet showInView:self.view];
actionSheet=nil;
It is working fine in iphone and ipad devices i.e, iphone5,iphone5c,iphone5s,iphone4,iphone4s,ipod touch, ipad etc.
But it is not working in iPad Mini. only cancel button is displayed.
You used AALocalizedString method when setting the other button titles of Action Sheet. Ensure that the method will give the string or not. If it is not giving any string then action sheet is not displaying other buttons rather than cancel button. Or once try the below code.
UIActionSheet *actionSheet = [[UIActionSheet alloc]initWithTitle:nil delegate:self cancelButtonTitle:@"Cancel" destructiveButtonTitle:nil otherButtonTitles:@"Capture Document",@"Select Document" ,@"Capture Photo",@"Select Photo",nil]; actionSheet.actionSheetStyle = UIActionSheetStyleDefault; [actionSheet showInView:self.view]; actionSheet=nil;