I have an iPad application with a UISplitView implemented. Within the UISplitView, I have some data being stored. A simple ID. I need to obtain this ID in the child view controllers of this UISplitView and I cannot figure out how to do it.
Here is what I have in my splitView.h file
@interface SplitView : UISplitViewController{
int reportId;
}
@property(nonatomic, assign) int reportId;
This is how I was attempting to obtain the data from the detail view. I have my main view inside a navigation view controller first, then inside the splitview, so I am calling like:
SplitView *mainVC = (SplitView *)[[self presentingViewController] presentingViewController];
NSLog(@"Getting report ID: %i", [mainVC reportId]);
** This code doesn't work. It makes sense to me... But obviously I am doing something wrong. Any help is apprecaited.