I want to change some button, text and background colors when the environment of the user is dark. I thougt about using the built-in lightsensor of the iPhone that's used for auto brightness. I came to the idea because I noticed iBooks does it too. Someone knows how? I'm only a beginner, and sorry if I made language mistakes :s
Thank you in advance!
Edit:
There's another way to do this, I found this piece of code but it's in Objective-C... Can someone translate it to swift please?