iOS: Why do I have white, rounded corners on my modal view?

前端 未结 9 801
悲哀的现实
悲哀的现实 2021-01-02 00:37

I have a modal view popping up in my iPad app and for some reason it has white, rounded corners.

It might be worth noting I built this model view in my storyboard, n

9条回答
  •  盖世英雄少女心
    2021-01-02 01:03

    I'm my case the white stuff are hidden in the drop shadow's view at layer background color. Solved by changing the background to clear color:

    //Monotouch code
    View.Superview.Layer.BackgroundColor = UIColor.Red.CGColor;
    

    If it's doesn't get rid of the white corner keep searching, remember to check out some properties of the View, SuperView and BackgroundViews:

    • Background color
    • Layer's background color
    • Layer's Border width and color
    • Heading
    • Clip to bounds

    Note: DropShadow is visible as View's SuperView at ViewWillApper

提交回复
热议问题