Skip to content

customsoftware/LightDark

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

LightDark

This is an app I built as a testbed for getting an app to automatically switch to a "dark" mode in low-light situations.

The way the code works is it listens for system notifications indicating the brightness of the device's display. That value, along with a stored threshhold value are the key components to this approach.

There are two protocols, one for handling Navigation bars, Tab bars, View controllers and text fields. The other handles the status bar. I've included a sample app to show how the changes are captured and utilized. There are lots of ways to modify this. There's no cocoa pod for this as yet. So far, just clone the repo and add the class and protocols/enums, etc. to your app.

About

Code to allow iOS app to change display modes with changes in ambient light

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages