How can I set the time before the screen dims?

Solution 1:

It is determined by the Auto Lock time and cannot be set independently of it. The Auto Lock can be changed in Settings > General > Auto-Lock. The longer you set it to not auto-lock, the longer the display will maintain it's normal brightness.

Solution 2:

Add this line to your piece of code in App Delegate after didFinishLaunching.

[[UIApplication sharedApplication] setIdleTimerDisabled:YES];