iOSアプリ起動中にスリープしないようにする

More than 1 year has passed since last update.

AppDelegate.swiftのapplication:didFinishLaunchingWithOptions:などでUIApplicationのidleTimerDisabledにtrueを入れてやれば良い。

func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
    UIApplication.sharedApplication().idleTimerDisabled = true
    return true
}
Sign up for free and join this conversation.
Sign Up
If you already have a Qiita account log in.