dismissWithClickedButtonIndex:animated: doesn't work on iPad when presenting with showFromBarButtonItem:animated:

Originator:arkadiusz.holko
Number:rdar://17411589 Date Originated:22-Jun-2014 07:43 PM
Status:Closed Resolved:24-Jul-2014 03:48 AM
Product:iOS SDK Product Version:8.0 beta 2
Classification: Reproducible:
 
Summary:
-dismissWithClickedButtonIndex:animated: doesn't do anything when an action sheet is presented with -showFromBarButtonItem:animated:.
This problem occurs only on the iPad.

Steps to Reproduce:
1. Create a Single View Application, add a UINavigationBar with UIBarButtonItem
2. Connect the following action to the bar button item:

    UIActionSheet *as = [[UIActionSheet alloc] initWithTitle:nil delegate:nil cancelButtonTitle:@"Cancel" destructiveButtonTitle:nil otherButtonTitles:@"Test", nil];
    [as showFromBarButtonItem:sender animated:YES];
    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1.0 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
        [as dismissWithClickedButtonIndex:as.cancelButtonIndex animated:YES];
    });
3. Run on the iPad simulator or device

Alternatively, run the attached sample project.

Expected Results:
Action sheet should show and dismiss after one second.

Actual Results:
Action sheet shows, but doesn't dismiss.

Version:
iOS 8 beta 2

Configuration:
iOS Simulator and iPad 3

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!