Target action never triggered from refresh control in storyboard

Number:rdar://14178445 Date Originated:17-Jun-2013
Status:Duplicate Resolved:
Product:iOS SDK Product Version:6.1
Classification:Other Bug Reproducible:Yes

When a UIRefreshControl is enabled for a table view controller in a storyboard the controller never receives the UIControlEventValueChanged event.

Steps to Reproduce:

1) Using Xcode 4.6.2 create a new project using the single view application template.
2) In the storyboard replace the UIViewController with a UITableViewController and ensure it is set as the initial view controller for the storyboard.
3) Configure the table view to have a single prototype table view using a basic style.
4) Add a custom table view controller to the project and set the class of the table view controller in the storyboard to this custom class.
5) Modify the table view controller to have a simple data model based on an MSMutableArray that is initialised with a set of NSNumber objects - the values of the numbers do not matter. Configure the table view controller data source to display the value of each NSNumber in the corresponding row of the table.
6) In the storyboard modify the table view controller to enable the UIRefreshControl (Refreshing: enabled). The Refresh Control should show up in the document outline.
7) Using the assistant editor to show the corresponding implementation file control-drag from the refresh control to create and connect the target-action method in the controller.
8) Modify the implementation of the refresh method to randomly shuffle the array of numbers, trigger a reload of the table view and to stop the refresh control:

  - (IBAction)refresh:(id)sender
    [self shuffle];
    [self.tableView reloadData];
    [self.refreshControl endRefreshing];
9) Build and run the project.

Expected Results:

Pulling down on the table view should show the refresh control and then trigger the refresh of the table view and then stop and hide the refresh control.

Actual Results:

The refresh control spinner starts but the table view is never refreshed. The debugger can be used to verify that the target-action method is never called.


Tested with Xcode 4.6.2. The problem occurs on both the simulator and on a device running iOS 6.1. 


As a workaround, the target-action can be set in the table view controller by adding the following to the viewDidLoad method:

[self.refreshControl addTarget:self action:@selector(refresh:) forControlEvents:UIControlEventValueChanged];


Closed as Duplicate of #12407621

This bug has been closed as Duplicate. The issue is being tracked under the original Bug ID# 12407621.

Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at 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!