UIAlerts displayed from UITableView delayed if cell selection style is UITableViewCellSelectionStyleNone

Originator:JasonGrandelli
Number:rdar://20499961 Date Originated:4/10/2015
Status:Open Resolved:
Product:iOS Product Version:8.1, 8.2, 8.3
Classification:UI/Usability Reproducible:Always
 
Summary:
UIAlerts are delayed an indeterminate amount of time whenever presented from a UITableViewCell with a selection style of UITableViewCellSelectionStyleNone. Any other selection style does not appear to impact UIAlert display. This is reproducible 100% of the time.

Steps to Reproduce:
The provided sample project contains all the necessary code to reliably reproduce the described behavior.
1: Tap a cell with a selection style of UITableViewCellSelectionStyleNone. Notice the UIAlert is not displayed immediately.
2: Tap a cell with a selection style of anything other than UITableViewCellSelectionStyleNone. Notice the UIAlert is displayed immediately.
3: In the sample the project you can toggle between UITableViewCellSelectionStyleNone and UITableViewCellSelectionStyleGray by tapping the right bar button item.

Expected Results:
The UIAlert should be presented immediately, regardless UITableViewCellSelectionStyle.

Actual Results:
UITableViewCellSelectionStyleNone has an impact on alert display timing while all other selection styles do not.

Version:
iOS 8.1, iOS 8.2, iOS 8.3

Notes:
Sometimes the very first cell interaction works as expected and all cell interactions after that are as described above. But that is not always the case.

If you wrap the presentViewController: call in a dispatch block like below, it will work as expected.

    dispatch_async(dispatch_get_main_queue(), ^{
        [self presentViewController:ac animated:YES completion:nil];
    });

or

    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.0 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
        [self presentViewController:ac animated:YES completion:nil];
    });

This issue seems to be related to presenting any sort of view and is potentially related to radar 20482249


Configuration:
iPhone 6 & Simulator

Attachments:
'TableViewAlertBlocking.zip' was successfully uploaded.

Sample code available for download https://www.dropbox.com/s/m3a31d7w3q65s4a/TableViewAlertBlocking.zip

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!