---
title: "一行代码让App运行时iPhone不会进入锁屏待机状态 "
author: "alex09"
date: "2011-10-06T19:53:56Z"
tags: []
categories: ["移动开发"]
slug: "app-iphone"
draft: false
lastmod: "2011-10-06T19:53:56Z"
id: 1186008
url: "https://alex09.iteye.com/blog/1186008"
---

如果你不希望应用运行时 iPhone 进入锁屏待机状态，加入下面这行代码即可

 setIdleTimerDisabled:YES];