An example to pass data in your case is this :
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
if ([segue.identifier isEqualToString:@"segueName"]) {
SecondClassName *destTableViewController = [[segue.destinationViewController viewControllers] objectAtIndex: 0];
destTableViewController.yourDataInSecondClass=yourDataInFirstClass;
}}
Care: You must give a name to the segue that connects the First VC with the Navigation Controller and change the segueName in the code above with this name.
prepareForSegue method is being called by own every time that you choose to change VC.
3
solved passing data to another VC that is embedded in a navigation controller [closed]