I followed this tutorial to have a shutdown menu. I added a TableViewController that will display a list of articles. For some reason it viewDidLoaddoesn't work.
This guide SideViewControllerwill control which controller will be displayed, if present seguewith the identifier "showPhoto" it will load a specific image.
if ([segue.identifier isEqualToString:@"showPhoto"]) {
PhotoViewController *photoController = (PhotoViewController*)segue.destinationViewController;
NSString *photoFilename = [NSString stringWithFormat:@"%@_photo.jpg", [menuItems objectAtIndex:indexPath.row]];
photoController.photoFilename = photoFilename;
}
I thought about recreating the same for TableViewControllerand trying to force the viewDidLoadcontroller, as shown here Force viewDidLoad to run in iOS , but it still does not work:
if ([segue.identifier isEqualToString:@"showList"]) {
TableViewController *tableController = (TableViewController*)segue.destinationViewController;
[tableController view];
}
TableViewController viewDidLoad:
- (void)viewDidLoad
{
[super viewDidLoad];
_sidebarButton.tintColor = [UIColor colorWithWhite:0.1f alpha:0.9f];
_sidebarButton.target = self.revealViewController;
_sidebarButton.action = @selector(revealToggle:);
[self.view addGestureRecognizer:self.revealViewController.panGestureRecognizer];
self.listTableView.delegate = self;
self.listTableView.dataSource = self;
_feedItems = [[NSArray alloc] init];
_homeModel = [[HomeModel alloc] init];
_homeModel.delegate = self;
[_homeModel downloadItems];
}
, (PhotoViewController MapViewController) , ... , , .
iOS, , .