This is a strange bug I am encountering on iOS 14 and it is very hard to replicate in a stand alone project. I sometimes get the following glitch when my app loads on iOS 14 betas that never happened on previous iOS versions. The attached gif shows the issue.
What I have is a subview called topPanel.
It is set to white color with alpha 1 in the Storyboard.
Then in viewDidLoad, I set it to clear color as follows:
Next, in other places in code, such as viewDidLayoutSubviews:
}
```
Code Block [GIF](https://i.stack.imgur.com/qvaE8.gif)
What I have is a subview called topPanel.
Code Block @IBOutlet weak var topPanel: UIView!
It is set to white color with alpha 1 in the Storyboard.
Then in viewDidLoad, I set it to clear color as follows:
Code Block topPanel.backgroundColor = UIColor.white.withAlphaComponent(0.0)
Next, in other places in code, such as viewDidLayoutSubviews:
Code Block > override func viewDidLayoutSubviews() { super.viewDidLayoutSubviews() self.cameraUI = CameraUIType.singleCam }
}
Code Block private var topPanelState = TopPanelState.none { didSet {
Code Block private var cameraUI = CameraUIType.singleCam { didSet { DispatchQueue.main.async { self.topPanelState = .none } switch topPanelState { case .none: topPanel.isHidden = false //Setting this to true doesn't cause bug ... } } Any ideas where this glitch could be coming from?
```