I am Started my iPad app using View-Based application. in first two views i added table views. Now as the third view i want add splitView to the view, for this purpose i add
As i know about split view controller you have to create new split View based app or you have to implement through programmatically. for this you need to create one master view controller which hold splitview and one table view controller without nib file and contain table view controller add one more view controller which display details
write the below code in master controller
implementing code like:
in .h page
UISplitViewController *splitViewController;
@property (nonatomic, retain) IBOutlet LeftViewController *left;
@property (nonatomic, retain) IBOutlet DetailViewController *right;
in .m page
// Do any additional setup after loading the view from its nib.
left = [[LeftViewController alloc] initWithStyle:UITableViewStylePlain];
UINavigationController *leftNav = [[UINavigationController alloc] initWithRootViewController:left];
right = [[DetailViewController alloc] initWithNibName:@"DetailViewController" bundle:nil];
UINavigationController *rightNav = [[UINavigationController alloc] initWithRootViewController:right];
left.detail = right;
splitViewController = [[UISplitViewController alloc] init];
splitViewController.viewControllers = [NSArray arrayWithObjects:leftNav,rightNav, nil];
splitViewController.delegate = right;
self.view = splitViewController.view;
[left release];
[right release];
all the start up method written in viewDidLoad not in viewWillAppear