iOS dark mode
lists at mangomultimedia.com
Wed Dec 4 15:46:10 EST 2019
On Wed, Dec 4, 2019 at 2:30 PM Andrew Bell via use-livecode <
use-livecode at lists.runrev.com> wrote:
> Is there a way to determine if an iOS device has dark mode ("Dark
> Appearance") enabled from within a LiveCode app?
> The inherited default text color of a field is black, but is changed
> to white by the OS when this mode is enabled (on a white background in
> this case which makes it appear invisible). This seems to only affect
> native mobile text fields, but not LC text fields.
> There is a feature enhancement to support dark mode for macOS, but I
> didn't see any reports for iOS.
> I'm not asking for an engine change, just curious if there is a way to
> check this so I can code around it. Perhaps mergNotify?
I don't know of a way to check this from within LiveCode using existing
tools. There is an API for checking which is documented here:
It should be possible to wrap that API using LiveCode Builder. From what
I've read, I think you also need to respond to a trailCollectionDidChange
message in case the user changes the setting while your app is open:
The easier (temporary) solution would be to tell the OS to use light
appearance for your app. It looks like there is an Info.plist key that you
can add which will force your app to use the light appearance. Perhaps that
will help in your situation?
More information about the use-livecode