iOS SDK: UIActionSheet's behavior does not conform to HIG as stated in header

Originator:mledford
Number:rdar://11572442 Date Originated:31-May-2012 11:49 PM
Status:Open Resolved:
Product:iPhone SDK Product Version:5.1
Classification:UI/Usability Reproducible:Always
 
Summary:

UIActionSheet's behavior does not conform to HIG as stated in header.

In the UIActionSheet header line 121 you find the following:

"// adds a button with the title. returns the index (0 based) of where it was added. buttons are displayed in the order added except for the
// destructive and cancel button which will be positioned based on HI requirements. buttons cannot be customized.
- (NSInteger)addButtonWithTitle:(NSString *)title;    // returns index of button. 0 based.
"
The problem is that if you manually add buttons and set the value of the cancelButtonIndex or destructiveButtonIndex property—the behavior described in the header shown above is not followed. Instead the buttons show in the order they are added.

Steps to Reproduce:

Create a project that manually exercises UIActionSheet. Lucky for you I have already done this. :)

Expected Results:

I expect that the buttons will show in their proper positions as stated in the header.

Actual Results:

The buttons appear in the order added.

Regression:

Notes:

Sample code project is attached.

31-May-2012 11:49 PM Michael Ledford:
'UIActionSheetTest.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!