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

前端 未结 9 745
悲哀的现实
悲哀的现实 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:06

    In order to make the modal view transparent and make the transparency happen before the view appeared was to move self.view.superview.backgroundColor = [UIColor clearColor] from viewDidAppear to the following:

    • (void)viewWillLayoutSubviews{ [super viewWillLayoutSubviews];

      self.view.superview.backgroundColor = [UIColor clearColor]; }

提交回复
热议问题