嗨,我有一個splitViewControllerUISplitViewController奇怪的行爲
mapViewController = [[MapViewController alloc] initWithManagedObjectContext:managedObjectContext startingRegion:startingRegion];
distanceViewController = [[DistanceTableViewController alloc] initWithManagedObjectContext:managedObjectContext];
distanceViewController.mapViewController = mapViewController;
setupViewController = [[SetupTableViewController alloc] initWithStyle:UITableViewStyleGrouped map:mapViewController.map];
setupViewController.positionSwitch.on = savePosition;
SearchTableViewController *searchViewController = [[SearchTableViewController alloc] initWithStyle:UITableViewStylePlain managedObjectContext:managedObjectContext];
searchViewController.mapViewController = mapViewController;
tabBarController = [[UITabBarController alloc] init];
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad)
{
UINavigationController *mapNavigationController = [[[UINavigationController alloc] initWithRootViewController:mapViewController] autorelease];
UINavigationController *searchNavigationController = [[[UINavigationController alloc] initWithRootViewController:searchViewController] autorelease];
UINavigationController *distanceNavigationController = [[[UINavigationController alloc] initWithRootViewController:distanceViewController] autorelease];
UINavigationController *setupNavigationController = [[[UINavigationController alloc] initWithRootViewController:setupViewController] autorelease];
UISplitViewController* splitVC = [[UISplitViewController alloc] init];
splitVC.viewControllers = [NSArray arrayWithObjects:searchNavigationController, mapNavigationController, nil];
splitVC.title = @"iMetano";
splitVC.tabBarItem = [[[UITabBarItem alloc] initWithTitle:@"Mappa" image:[UIImage imageNamed:@"mapIcon2.png"] tag:0] autorelease];
NSArray *viewControllersArray = [NSArray arrayWithObjects: splitVC,setupNavigationController,nil];
[splitVC release];
tabBarController.viewControllers = viewControllersArray;
}
當我啓動我的應用程序中的肖像,一切工作正常。
當我啓動我的應用程序中的風景是這樣的結果
alt text http://img828.imageshack.us/img828/4100/errorw.png
- 我看到的第一個的viewController SearchTableViewController的只有觀點與UINavigationController的和狀態欄之間的一些像素
- 當我旋轉肖像,並在我回到景觀後,我看到兩個viewController的視圖,但第二個有一些像素之間的statusBar和UINavigationControllor
我不明白爲什麼。
我嘗試刪除UINavigationController和所有在縱向和橫向工作正常,所以這個問題似乎與UINavigationController – 2010-07-20 08:24:33