I have an array which has lots of data which is dispalyed on the TableView. I am trying to push the selected row name. So every time I have to write IF method, while every row has the same method. Is there a way to just push the selected row?
Thanks from now.
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
SecondViewController *DetailViewController = [[SecondViewController alloc] initWithNibName:@"SecondViewController" bundle:nil];
if ([[Brands objectAtIndex:indexPath.row] isEqual:@"A"]){
}
if ([[Brands objectAtIndex:indexPath.row] isEqual:@"B"]){
}
.
.
.