Achieve a Uniform UIBlurEffect in the Primary View of a UISplitView

前端 未结 2 1798
天命终不由人
天命终不由人 2021-01-03 08:55

I\'m using a stock UISplitViewController with out-of-the-box Master and Detail view controllers. In a storyboard, I\'ve added a

相关标签:
2条回答
  • 2021-01-03 09:04

    The problem is that it is a private class that you can't test against.

    Fortunately _UIPopoverSlidingChromeView is the subclass of UIPopoverBackgroundView that is public (because in regular popover implementation flow client may customize the popover background chrome by providing a class which subclasses UIPopoverBackgroundView).

    for (UIView *subview in self.viewController.view.superview.superview.subviews) {
        if ([subview isKindOfClass:[UIPopoverBackgroundView class]]) {
            subview.alpha = 0.0;
        }
    }
    

    This should hide the _UIPopoverSlidingChromeView.

    0 讨论(0)
  • 2021-01-03 09:10
        //как убрать дурацкий прямоугольник при прозрачном фоне maser окна в режиме UISplitViewControllerDisplayModeOverlay
        CALayer* v_1 =  self.view.superview.superview.superview.layer.sublayers[0];
        CALayer* v_2=v_1.sublayers[0];
        v_2.borderWidth=0;
    
    0 讨论(0)
提交回复
热议问题