I have didSelectRowAtIndexPath selecting views based on the row number selected, i.e.:
if (indexPath.row == 1) {
DetailViewController *detail = [self.storyboard instantiateViewControllerWithIdentifier:@"IdentifierFromStoryboard"];
[self.navigationController pushViewController:detail animated:YES];
}
But as I’ve now implemented a search bar I’d rather be selecting the views based on the cell.textLabel.text from the cell selected. How would I achieve this?
Edit
You can get the cell by using cellForRowAtIndexPath