I am having difficulties defining a navigation between several tables. I am using the navigation template for iOS apps. From The RootViewController (RootViewController.xib already contains a table), I can navigate to another table view (in the interface builder I was able to connect the IBOutlet with the custom UITableViewController):
@interface RootViewController : UITableViewController <NSFetchedResultsControllerDelegate> {
xxxTableViewController *teeTimeTableVC;
}
@property (nonatomic, retain) IBOutlet xxxTableViewController *xxxTableVC;
In RootViewController.m the following line works fine:
[self.navigationController pushViewController:self.xxxTableVC animated:YES];
The interface builder does not let me connect the IBOutlet in the second XIB file (let's say xxxTableViewController) with the next UITableViewController.
@interface xxxTableViewController : UITableViewController
<UITableViewDataSource, UITableViewDelegate> {
yyyTableViewController *yyyTableVC;
}
@property (nonatomic, retain) IBOutlet yyyTableViewController *yyyTableVC;
In xxxTableViewController.m the following line display a warning:
[self.navigationController pushViewController:self.yyyTableVC animated:YES];
In the code, I also get a warning: incompatible Objective-C types 'struct yyyViewController *', expected 'struct UIViewController *' when passing argument 1 of 'pushViewController:animated:' from distinct Objective-C type
Am I trying to implement a bad concept? Is it only possible this way directy from the RootViewController? Both controller classes seem to be identical:
@interface yyyTableViewController : UITableViewController
<UITableViewDataSource, UITableViewDelegate>{
}
Can please anybody give me a hint? Do I need to use different UI elements or implement another protocol?
Thank you, Patric