Yannick Weiss

iOS Reading Light

Build the best iOS Reading Light app with just one line of code. The iPhone display makes for a great reading light, but we still need an app that displays a white screen and prevents the iPhone from going to the lock screen.

Create Project

  • open Xcode 7
  • File > New > Project
  • iOS > Application > Single View Application

Code

Inside func application add the following line:

UIApplication.sharedApplication().idleTimerDisabled = true

Deploy

Select your device in the dropdown next to the play button and press run. The app is now installed on your device.