14

I'm using iPhone simulator for my development and most of the ui components are written using swift. Is there an easy way to switch between dark mode and light mode for testing purpose?

I find the enabling and disabling dark mode from settings very time consuming. This shortcut will expedite my testability of both dark mode and light mode.

ogirginc
  • 4,948
  • 3
  • 31
  • 45

3 Answers3

29

I've just recently stumbled upon it. Great way to switch between modes. Hope it helps:

CMD+SHIFT+A

colidyre
  • 4,170
  • 12
  • 37
  • 53
leoleljak
  • 290
  • 3
  • 5
13

Switch iPhone Simulator to Dark mode while you inside another app on the simulator go to.

Features => Toggle Appearance

and you can also by default shortcut on your keyboard

CMD+SHIFT+A

or you can go to device Settings => Developer => Toggle Dark Mode

Simulator Shortcut

Balalen
  • 460
  • 6
  • 13
0

I think I've read enough Documentation to tell you that(Maybe I'm wrong too.)

According to my knowledge, We don't have a Keyboard Shortcut to toggle(switch) between Dark mode and Light appearance in iOS Simulator We do have shortcut for tvOS though which is Command-Shift-D to toggle but not in the iOS Simulator

Referred Links:

I've also research for creating a shortcut (as there is none in existence) with given code in following link XCode Simulator: how to change its shortcuts?

But I came to know that we can only change only Keyboard shortcuts(can't create one) which are already there in Simulator>Hardware>...(Which are pre-assigned)

Hope , It Helps :)

Nayan Dave
  • 1,078
  • 1
  • 8
  • 30