I implemented the SplitView
in my app as follow.
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;
}
Problem
It is working fine in ios 6.
But in ios 7 it shows the some view which i did not included. See my following image & the extra view is in Pink Color
.
float systemversion=[[[UIDevice currentDevice]systemVersion]floatValue];
if(systemversion>=7.0f)
{
self.edgesForExtendedLayout=UIRectEdgeNone;
}
Try this code
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.