kingston
kingston

Reputation: 1553

getting error unrecognized selector sent at tableview when last row of table view is clicked

i m parsing json data and populating the tableview and making some validation with the incoming json data..everthing works fine.i made the code such that when the last table view row is clicked it got to open a modal view controller.when clicked .i m getting this error [tableiew1] Unrecognised selector send at the instance...could u guys help me out below is the code.

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
// Navigation logic may go here. Create and push another view controller.


if (indexPath.row == 5) {

    if (self.dvController6 == nil) 
    {
        Vad_tycker *temp = [[Vad_tycker alloc] initWithNibName:@"Vad_tycker" bundle:[NSBundle mainBundle]];
        self.dvController6 = temp;
        [temp release];
    }

    [self presentModalViewController:self.dvController6 animated:YES];


}

   }

enter image description here

Upvotes: 0

Views: 448

Answers (2)

Shah
Shah

Reputation: 5020

I think you forgot to connect the tableView Datasource and Delegate methods in the vad_tycker controller.

Also check that the instance of UITableView i.e. in your case tableView1 is also connected with the TableView. on the view.

Thanks

Upvotes: 1

Jhaliya - Praveen Sharma
Jhaliya - Praveen Sharma

Reputation: 31730

Seems like you have forgotten to provide the access for the tableView1 in Vad_tycker. Or You should do a crosscheck whether you have assigned the correct instance in tableView delegate's and also make sure to provide the implementation for the method of delegate's in their respect target classes.

Upvotes: 1

Related Questions