Hello,
You can now use the systemAppearance property to query the current dark or light appearance. I always get - light - even though I have switched on dark mode.
Does anyone have a similar problem?
How did you solve it? Is now mandatory in the AppStore.
Greetings Volker
iOS dark mode
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Re: iOS dark mode
Hi,
I have the same problem, did you find any solution?
Thanks
I have the same problem, did you find any solution?
Thanks
-
- VIP Livecode Opensource Backer
- Posts: 138
- Joined: Tue Feb 23, 2010 10:53 pm
- Location: Saint Louis, Missouri USA
Re: iOS dark mode
Try this in the Message Box:
LiveCode responds with the correct setting when I switch between Light and Dark in Systems Preferences > General preference pane.
I'm using LC 9.6.2-rc-2 on a Mac Mini (M1).
Bob
Code: Select all
put the systemAppearance into message box
I'm using LC 9.6.2-rc-2 on a Mac Mini (M1).
Bob
-
- Livecode Opensource Backer
- Posts: 9477
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: iOS dark mode
Works for me.
I'm using LC 9.6.2-rc-2 on a Mac Mini (2018 Intel, MacOS 11.3 Beta 2).
Mind you, reporting the systemAppearance is just the start, if you
want your stack to "go black" you will have to do quite a lot of heavy lifting . . .
That code will NOT switch the stack's appearance if dark mode is switched while the stack is loaded
[this is on a Macintosh, not in iOS]
- -
I'm using LC 9.6.2-rc-2 on a Mac Mini (2018 Intel, MacOS 11.3 Beta 2).
Mind you, reporting the systemAppearance is just the start, if you
want your stack to "go black" you will have to do quite a lot of heavy lifting . . .
Code: Select all
on openCard
put the systemAppearance into MACLOOK
if MACLOOK contains "dark" then
set the backgroundColor of card "KARD1" to black
set the backgroundColor of fld "INP" to black
set the borderColor of fld "INP" to white
set the textColor of fld "INP" to white
else
set the backgroundColor of card "KARD1" to white
set the backgroundColor of fld "INP" to white
set the borderColor of fld "INP" to black
set the textColor of fld "INP" to black
end if
end openCard
[this is on a Macintosh, not in iOS]
- -
- Attachments
-
- SYSAPP.livecode.zip
- Here's the stack.
- (983 Bytes) Downloaded 155 times