I have a UITableViewController
in which I am implementing a UIRefreshControl
for pull to refresh. Everything is working fine, the table is getting populated from my web service. But when I pull down to refresh I get the error:
[MyViewController refreshView]: unrecognized selector sent to instance ...
Which is complaining about the addTarget action here:
UIRefreshControl * refresh = [[UIRefreshControl alloc] init];
[refresh addTarget:self action:@selector(refreshView) forControlEvents:UIControlEventValueChanged];
The error flag on that line in the editor is Undeclared selector 'refreshView'
My refreshView method is simply:
- (void) refreshView: (UIRefreshControl *)refresh {
NSLog(@"test");
}
Any ideas as to why this would be causing the application to crash? (I am running iOS 7.1)