How can I pass data between a Navigation Controller and a Table View Controller? I have tried prepareForSegue method but it doesn't work.. I have tried to put a breakpoint to see if the flow calls this method but it seems that the prepareForSegue of my Navigation Controller class is never called. Here is some sample of code :
NavController.h :
@interface NavController : UINavigationController
@end
NavController.m :
- (void) prepareForSegue: (UIStoryboardSegue *) segue sender: (id) sender
{
TableViewController *destViewController = (TableViewController*)segue.destinationViewController;
destViewController.title = @"Home";
destViewController.URLValue = @"http://www.example.com";
}
TableViewController.h :
@interface TableViewController : UITableViewController
@property (nonatomic, strong) NSString *URLValue;
@end