Skip to content

Instantly share code, notes, and snippets.

@wethu
Created May 27, 2014 21:46
Show Gist options
  • Select an option

  • Save wethu/f38966d37c2215f8546e to your computer and use it in GitHub Desktop.

Select an option

Save wethu/f38966d37c2215f8546e to your computer and use it in GitHub Desktop.
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
// Segue into Client detail tvc if splitviewcontroller
static NSString *segueIdentifier = @"showClientDetail";
UITableViewController *detailView = [self.splitViewController.viewControllers objectAtIndex:1];
if (![detailView isKindOfClass:[CPClientDetailTableViewController class]]) {
[self performSegueWithIdentifier:segueIdentifier sender:nil];
}
// Set the client in the client detail tvc delegate
Client *client = [_clients objectAtIndex:indexPath.row];
if (_delegate) {
[_delegate selectedClient:client];
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment