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;
}
問題
iOS6で問題なく動いています。
しかし、ios 7 では、私が含めなかったいくつかのビューが表示されます。私の次の画像とを参照してくださいextra view is in Pink Color
。