Domanda

The Job Table View Container makes the Job Table View Controller half the size on the screen, which is the desired result. But when I click a cell and it goes to Job Detail View Controller, it is still half the screen size. I don't want the Container to affect the Detail View Controller screen.

enter image description here

enter image description here enter image description here

I tried this:

- (void)tableView:(UITableView *)tableView didDeselectRowAtIndexPath:(NSIndexPath *)indexPath {

    UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"Main" bundle:nil];
    JobDetailViewController *jobDetailViewController = (JobDetailViewController *)[storyboard instantiateViewControllerWithIdentifier:@"jobDetailView"];
    [self.navigationController pushViewController:jobDetailViewController animated:YES];
}

And this:

- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
{
    if ([[segue identifier] isEqualToString:@"jobDetail"]) {

        [[segue destinationViewController]
         sendSelectedJobID:[self jobID]];
    }
}

Answer: enter image description here

È stato utile?

Soluzione

You need to re-arrange the view hierarchy as follows:

Navigation Controller -> Job View Controller -> container -> Job table view controller

Also Pass the Navigation Controller reference to the Job table view controller. That is update the table view's navigationController property to the Navigation Controller in use.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top