I see a white divider between the navigation bars in a UISplitviewController on iOS7. I couldn't find a way to change that to black. I changed the backgroundColor of the splitViewController's view to black but no luck.
Screenshot: http://cl.ly/SCcu
As long as your screen is in Landscape, you can use this as a workaround:
UIView *coverView = [[UIView alloc] initWithFrame:CGRectMake(320, 0, 1, 64)];
[coverView setBackgroundColor:[UIColor colorWithPatternImage:[UIImage imageNamed:@"black_pixel.png"]]];
[splitViewController.view addSubview:coverView];
Under the hood, there is a UILayoutContainerView
at the top of the screen, below the master and detail views. To change the separator color between nav bars, you only need to change the background color of that view.
In Swift, in your subclass of SplitViewController, try following:
override func viewDidLayoutSubviews() {
super.viewDidLayoutSubviews()
if let potentialSeparatorView = view.subviews.first as? UIView {
if round(potentialSeparatorView.bounds.height) == 64 {
potentialSeparatorView.backgroundColor = UIColor(red:0.20, green:0.55, blue:0.83, alpha:1)
}
}
}
Put your UISplitViewController
in additional ViewController
with Container View like this:
Then hide UINavigationBar
s in master and detail viewControllers
, and you'll have only one UINavigationBar
without a white line in additional UIViewController.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With