Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to make Night Mode for display in iPhone app

Tags:

iphone

I need to implement different colors and background images for all UI elements in my app in day and night.How can i implement this other than giving two nibs for two modes.Please help me.

like image 594
Sree Avatar asked Oct 10 '22 06:10

Sree


1 Answers

I've done this myself and it ends up being a lot more work than you think to do it properly.

In the end I had to subclass nearly every GUI item to hold state information (I had a night mode and also an intensity) so there was a different base colour used for all the drawing. You also need to have a basic (almost monochrome) theme to the app so that controls look the same in night mode and day mode. Gradients and textured backgrounds dont tend to work very well, for example.

Once you've created your dual mode controls you then need to decide how to let them know about changes of mode - whether to manually set or register for notifications.

This is not too bad for the controls you've listed in the comments, not sure about the map view though.

You can achieve a crappy night mode by using a semitransparent overlay.

like image 143
jrturton Avatar answered Oct 19 '22 05:10

jrturton