Page 1 of 1

iOS dark mode

Posted: Fri Aug 28, 2020 5:06 am
by Volker
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

Re: iOS dark mode

Posted: Sat Feb 27, 2021 8:00 pm
by friccio
Hi,

I have the same problem, did you find any solution?

Thanks

Re: iOS dark mode

Posted: Mon Mar 01, 2021 6:30 am
by bobcole
Try this in the Message Box:

Code: Select all

put the systemAppearance into 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

Re: iOS dark mode

Posted: Mon Mar 01, 2021 4:33 pm
by richmond62
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 . . .

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
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]
-
Screenshot 2021-03-01 at 17.42.14.png
Screenshot 2021-03-01 at 17.42.44.png
-