I am having problems with the UISplitViewController in an iPad app. I am trying to make a simple navigation tree using the UINavigationController inside a UISplitView. For this, I used the following base code:
NavController.h
@interface NavController : NSObject {
UINavigationController *navigationController;
}
@property (nonatomic, retain) IBOutlet UINavigationController *navigationController;
@end
NavController.m
#import "NavController.h"
@implementation NavController
@synthesize navigationController;
- (void) awakeFromNib {
UIViewController *testController = [[UIViewController alloc] init];
UITableView *tableView = [[UITableView alloc] init];
[testController setView: tableView];
[navigationController pushViewController: testViewController
animated: YES];
}
@end
This code successfully displays the view on the navigation controller, and I can go back using the "Back" button, however my problem arises because after that my UISplitViewController no longer automatically rotates or rotates altogether from the portrait position. When I delete this code (and the view is not clicked), it works as expected.
What am I doing wrong and am I going to do it right?
!