我搜索了所有相关问题,但所有答案都是通过设置splitview背景颜色来改变颜色。它确实在UISplitViewControllerDisplayModeAllVisible
模式下工作,但在UISplitViewControllerDisplayModePrimaryOverlay
中没有。有谁能够帮我 ?非常感谢你!
答案 0 :(得分:0)
这是我的答案,在splitviewcontroller中添加1px行
_seperateView = [[UIImageView alloc] initWithFrame:CGRectMake(0,0,1.0 / [UIScreen mainScreen] .scale,CGRectGetHeight(self.view.frame)+20)];
_seperateView.image = [UIImage imageNamed:@“seprateLine”]
[self.view insertSubview:_seperateView atIndex:0];
并在viewWillLayoutSubviews
中对其进行布局
- (void)viewWillLayoutSubviews {
_seperateView.left = _masterNav.view.width + _masterNav.view.left;
}