Is it possible to change the color of the divider? If so, how?
I've researched as much as possible here and on Google, without luck. I'm surprised it isn't more common...
Thanks
On iOS 7, the fix is to set the background color of your UISplitViewController to the same as the deep background color (probably black).
There is a quicker and better way of doing it. Just change spliViewController's view backgroundColor property:
splitViewController.view.backgroundColor = [UIColor greenColor];
In the detailViewController of the SplitViewController, I added the following code to cover up the black line. My custom header is blue and 88px tall.
//blue line that covers the vertical black separator in the header
UIView *blueHeaderSplitViewSeparatorMask = [[UIView alloc] initWithFrame:CGRectMake(320, 0, 2, 88)];
[blueHeaderSplitViewSeparatorMask setBounds:CGRectMake(320, 0, 2, 88)];
[blueHeaderSplitViewSeparatorMask setBackgroundColor:[UIColor colorWithRed:0.0f/255.0f green:96.0f/255.0f blue:182.0f/255.0f alpha:1.0f]];
[self.view.superview addSubview:blueHeaderSplitViewSeparatorMask];
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