Skip to content

Instantly share code, notes, and snippets.

@anujb
Created December 13, 2011 22:53
Show Gist options
  • Save anujb/1474324 to your computer and use it in GitHub Desktop.
Save anujb/1474324 to your computer and use it in GitHub Desktop.
QElement selected
- (void)selected:(QuickDialogTableView *)tableView controller:(QuickDialogController *)controller indexPath:(NSIndexPath *)indexPath {
[[tableView cellForRowAtIndexPath:indexPath] becomeFirstResponder];
if (_onSelected!= nil)
_onSelected();
if (self.controllerAction!=NULL){
SEL selector = NSSelectorFromString(self.controllerAction);
if ([tableView.controller respondsToSelector:selector]) {
objc_msgSend(tableView.controller ,selector, self);
} else {
NSLog(@"No method '%@' was found on controller %@", self.controllerAction, [tableView.controller class]);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment