我SplitView
在我的应用程序中实现了如下。
AppDelegate.h
@property (nonatomic, strong) IBOutlet UISplitViewController *splitViewController;
AppDelegate.m
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
LeftsideViewController *masterViewController = [[LeftsideViewController alloc] initWithNibName:@"LeftsideViewController" bundle:nil] ;
UINavigationController *masterNavigationController = [[UINavigationController alloc] initWithRootViewController:masterViewController] ;
HomeViewController *detailViewController = [[HomeViewController alloc] initWithNibName:@"HomeViewController_iPad" bundle:nil];
UINavigationController *detailNavigationController = [[UINavigationController alloc] initWithRootViewController:detailViewController];
masterViewController.homeViewController = detailViewController;
self.splitViewController = [[UISplitViewController alloc] init] ;
[self.splitViewController.view setBackgroundColor:[UIColor blackColor]];
self.splitViewController.delegate = detailViewController;
self.splitViewController.viewControllers=[NSArray arrayWithObjects:masterNavigationController,detailNavigationController,nil];
self.window.rootViewController = self.splitViewController;
NSLog(@"VIEWs %@",[self.window subviews]);
[self.window makeKeyAndVisible];
return YES;
}
问题
它在 ios 6 中运行良好。
但在 ios 7 中,它显示了我没有包含的一些视图。请参阅我的以下图片和extra view is in Pink Color
.