Hello fellow developers,
I've encountered a peculiar issue in iOS 16 that I wanted to bring to light and see if anyone else has experienced the same.
Issue Description: When designing a user interface in a storyboard, if I set the alpha value of a UI component (e.g., UIView, UIButton) to 0.0 within the storyboard, and then programmatically change that alpha value to 1.0 during runtime, the alpha value unexpectedly reverts back to its original storyboard value (0.0) when the device transitions between light and dark modes.
Steps to Reproduce:
Create a UI component in a storyboard and set its alpha to 0.0. Programmatically change the alpha value of the component to 1.0 during runtime. Trigger a light/dark mode transition on the device. Observe that the component's alpha value reverts to 0.0. Additional Observations:
This behavior seems as if the UIView is being reloaded from the storyboard during the mode transition. However, breakpoints set in viewDidLoad() and loadView() are not triggered during the mode change, indicating that the views are not being reloaded in the traditional sense. This issue was observed in iOS 16, but it's unclear if it's present in previous iOS versions. Has anyone else experienced this behavior? If so, are there any known workarounds or fixes? It's crucial for ensuring a consistent user experience across mode transitions.
Thank you for your insights and assistance!