Last button in an action sheet will not display on iPad

Originator:justinohms
Number:rdar://16288517 Date Originated:2014-03-11
Status:Open Resolved:
Product:iOS SDK Product Version:iOS 7.x
Classification: Reproducible:Always
 
Summary:
In a universal iOS app an action sheet that displays properly on the iPhone will not display the last button added to the action sheet when shown on an iPad or in the iPad simulator.

Steps to Reproduce:
1. Create a single view universal iOS project in xcode.
2. Add the <UIActionSheetDelegate> protocol to the view controller's header
3. Add a button to the view in the story board.
4. Create an ibaction outlet in the view controller attached to the button

5. Add the following code to the ibaction function in the view controller 
//-----------------------------------------------------
    UIActionSheet *sourcesheet =
    [[UIActionSheet alloc] initWithTitle:@"Select a source" delegate:self cancelButtonTitle:@"Cancel" destructiveButtonTitle:nil otherButtonTitles:nil ];
    [sourcesheet addButtonWithTitle:@"Button 1"];
    [sourcesheet addButtonWithTitle:@"Button 2"];
    [sourcesheet addButtonWithTitle:@"Last Button"];  
    [sourcesheet showInView:self.view];
//-----------------------------------------------------

6.  Run the application with one of the iPhone simulators 
7.  Note the buttons displayed in the action sheet.
8.  Run the application with one of the iPad simulators
9.  Note the buttons displayed in the action sheet.

(See attached sample project to reproduce)


Expected Results:
All buttons on action sheet should be displayed regardless of platform.

Actual Results:
The last button added to action sheet is not displayed on iPad

Version:
iOS 7.1 (11D5145e)  

Notes:
A work around is to add a dummy button to the end of the actionsheet when running on an iPad.

I have attached a sample project that demonstrates this behavior.

Configuration:
occurs in iOS 7 and 7.1(11D5145e) ,  and xcode 5 and 5.1 beta 5

Attachments:
'ActionSheetTest.zip' was successfully uploaded.

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!