Question: ------- OBJECTIVE - C ------------- I added a Table View (as a SUBVIEW) on a View Controller PROGRAMMATICALLY. It's NOT visible on the view controller

------- OBJECTIVE - C -------------

I added a Table View (as a SUBVIEW) on a View Controller PROGRAMMATICALLY. It's NOT visible on the view controller in the storyboard.

When a user clicks on a cell in a table view, they should be taken to a different view controller.

You can switch view controllers through PerformSegueWithIdentifier But the code below is not working. When I click on the table view cell, nothing happens. I have a push segue.

-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { [self performSegueWithIdentifier:@"mySegue" sender:self]; } 

HOW DO I SWITCH TO A DIFFERENT VIEW CONTROLLER PROGRAMMATICALLY?

pushing the view doesn't work either.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!