Background Color Issue in Custom Keyboard Extension in Dark Mode for iOS 18.4.1
Issue Description
I'm developing a custom keyboard extension for iOS 18.4.1 and experiencing an issue with background colors when using Dark Mode. After a user makes a selection from a menu in the keyboard, the background color of a view unexpectedly changes to white instead of maintaining the dark theme color.
Steps to Reproduce
Enable Dark Mode on the device
Activate the custom keyboard in any text field
Perform a specific interaction (selecting an item from a menu)
After selection, the background of the view turns white instead of remaining dark
Technical Details
The issue appears to be related to UIScrollView's background color behavior
The problem doesn't occur on initial display of the menu, only after user interaction
I've attempted to set background colors explicitly on the view hierarchy, but the issue persists
Environment
iOS 18.4.1
Xcode 16.0
Custom keyboard extension
Questions
Has anyone encountered similar issues with view background colors changing after user interactions in keyboard extensions on iOS 18.4.1?
Is there a recommended approach to maintain dark background colors in keyboard extensions after user selections?
Could this be related to a change in how UIScrollView handles background colors in recent iOS versions?
Thank you for any assistance or insights.
Topic:
UI Frameworks
SubTopic:
UIKit