Post

Replies

Boosts

Views

Activity

Comment on Alpha Value of UIButton set in a storyboard is reset on Light/Dark Mode Transition
Furthermore this only happens if I use a color from my assets.xcassets catalog. So it appears to be a bug, which is color catalog related and affects the current state of the UIView and its subcomponents. If I revert back to using a default color, there's no issue whatsoever. Feedback # FB12984060 I can post the code and maybe the storyboard and you can try this yourself.
Topic: UI Frameworks SubTopic: UIKit Tags:
Aug ’23
Comment on Alpha Value of UIButton set in a storyboard is reset on Light/Dark Mode Transition
It should respect the active/inactive state as is at runtime, and rebuild the UI wiht those components, not throwaway your state, and revert back to the NSLayoutConstraints as set in the storyboard. Let me put it this way. If I have 10 NSLayoutConstraints, 9 of which are set to inactive in the storyboard and only one is active, if at runtime the app makes the 9 layout constraint active and the 1 active constraint inactive, light/dark mode change will revert to the original storyboard setup.
Topic: UI Frameworks SubTopic: UIKit Tags:
Aug ’23
Comment on Alpha Value of UIButton set in a storyboard is reset on Light/Dark Mode Transition
No, it should not go back to the initial storyboard state, where constraint X was deactivated. It should work with the current UIView hierarchy and the current constraints, with whatever their active state was set in the code. Why would this also happened when changing from light/dark mode? With rotation or changing light/dark mode, the current UIView hierarchy and its current set of layout constraints should be respected, especially if they were modifications to their state in the code.
Topic: UI Frameworks SubTopic: UIKit Tags:
Aug ’23