I am really struggling with with passing variables from one class to another. I was following the answer in this question, and was able to implement the first part (Passing Data Forward) successfully. My problem is when I get to the second part (Passing Data Back), I get hung up on 4)
where I need to declare an interface for my second.h file. I already have an interface declared in that .h file:
@interface RootViewController : UITableViewController <UISplitViewControllerDelegate>{
And when I try to declare another one, I run into lots of errors. I read that it is possible, I am just not sure the exact syntax I guess.
Here's the complete .h file
#import <UIKit/UIKit.h>
@protocol SubstitutableDetailViewController
- (void)showRootPopoverButtonItem:(UIBarButtonItem *)barButtonItem;
- (void)invalidateRootPopoverButtonItem:(UIBarButtonItem *)barButtonItem;
@end
@interface RootViewController : UITableViewController <UISplitViewControllerDelegate>{
UISplitViewController *splitViewController;
UIPopoverController *popoverController;
UIBarButtonItem *rootPopoverButtonItem;
NSMutableArray *logMessages;
}
@property (nonatomic, assign) IBOutlet UISplitViewController *splitViewController;
@property (nonatomic, retain) UIPopoverController *popoverController;
@property (nonatomic, retain) UIBarButtonItem *rootPopoverButtonItem;
@end