UIAlertController as ActionSheet not correctly sized when using actions with UIAlertActionStyleCancel on iPad

Originator:ruud.puts
Number:rdar://21198077 Date Originated:2-Jun-2015
Status:Open Resolved:
Product:iOS Product Version:8.x
Classification:Bug Reproducible:Yes
 
Summary:
When creating a UIAlertController with UIAlertControllerStyleActionSheet as it's preferred style, and adding a button with UIAlertActionStyleCancel results in display problems. The presented _UIPopoverView's frame isn't large enough to display the whole action sheet.

As shown in the last two screenshots, using Reveal it's shown the Cancel button is there but cut off by the bounds of the popover view.

I've posted demo code on Github, so see the problem in action: https://github.com/RuudPuts/AlertControllerRadar

Steps to Reproduce:
1. Add a button to the view
2. Create a touchUpInside handler which displays a UIAlertController with preferred style UIAlertControllerStyleActionSheet
3. Add an action to the alertController, with type UIAlertActionStyleCancel

Expected Results:
When running the project, and tapping the button an ActionSheet is shown in an popover at location of the button. The ActionSheet is large enough to show the title, message and the cancel button.

Actual Results:
When running the project, and tapping the button an ActionSheet is shown in an popover at location of the button. The ActionSheet only shows the title and message, cutting off the Cancel button.

Version:
Found on device running 8.1, also appears with iOS 8.3 on simulator. Using iOS SDK 8.3

Notes:


Configuration:
iPad Air (MGL12HC/A) - 16GB

Attachments:
'Screen Shot 2015-06-02 at 09.09.36.png', 'Screen Shot 2015-06-02 at 09.09.34.png', 'Screen Shot 2015-06-02 at 09.18.50.png' and 'Screen Shot 2015-06-02 at 09.18.28.png' were 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!