UISplitViewController problem

Joined
Jun 3, 2011
Messages
54
Reaction score
0
Points
6
Hello!!

After few successful simple GUI for iPhone, I am trying to make split-view based GUI for iPad (without using xib).

In the appdelegate.h, I am using below code

Code:
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {    

	//window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
	window = [[UIWindow alloc] init];
        splitViewController = [[UISplitViewController alloc] init];
	rootViewController = [[[RootViewController alloc] initWithStyle:UITableViewStylePlain] autorelease];
	detailViewController = [[[DetailViewController alloc] init] autorelease]; 
	UINavigationController *rootNav = [[UINavigationController alloc] initWithRootViewController:rootViewController ];
	UINavigationController *detailNav = [[UINavigationController alloc] initWithRootViewController:detailViewController ] ;
	splitViewController.viewControllers = [NSArray arrayWithObjects:rootNav, detailNav, nil];
	splitViewController.delegate = detailViewController;
	[window addSubview:splitViewController.view];
	[window makeKeyAndVisible];
	return YES;  
	
}


RootViewController.m is intended to populate the table with 10 rows (row 0, row1..row9) and clicking on either will simply display as detail view.

But On running on simulator, there is no GUI at all except one white bar at the top. Rest screen is completely black and there is no message even on console.

Where am I making mistake?

Plz guide.
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top