M
M
MagoVinch2014-01-07 19:18:24
Objective-C
MagoVinch, 2014-01-07 19:18:24

How to call segue from tableviewcontroller?

I have a tableviewcontroller and a simple view controller, when you click on a cell in the table (tableviewcontroller), you need to make a transition to the view controller. How to do it?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Dmitry Zamula, 2014-01-08
@MagoVinch

I don’t know, there is another way, but I do it this way: I describe the following function and call the segue I need in it

-(void) tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
    [tableView deselectRowAtIndexPath:indexPath animated:true];
    [self performSegueWithIdentifier:@"segue" sender:nil];
}

A
Alexey Kolosov, 2014-01-07
@satisFUCKtor

connect with Ctrl held cell prototype on the tableviewcontroller with the desired viewcontroller

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question