防止程序输入时候产生错误后,锁定屏幕崩溃
2013-01-24 22:05
435 查看
- (void)applicationDidEnterBackground:(UIApplication *)application{
// Use this method to release shared resources, save user data,
// invalidate timers, and store enough application state information to
// restore your application to its current state in case it is terminated later.
// If your application supports background execution,
// this method is called instead of applicationWillTerminate: when the user quits.
if (([[[UIDevice currentDevice] systemVersion] floatValue] >= 6.0))
{
// Acquired additional time
UIDevice *device = [UIDevice currentDevice];
BOOL backgroundSupported = NO;
if ([device respondsToSelector:@selector(isMultitaskingSupported)])
{
backgroundSupported = device.multitaskingSupported;
}
if (backgroundSupported)
{
backgroundTask = [application beginBackgroundTaskWithExpirationHandler:^{
[application endBackgroundTask:backgroundTask];
backgroundTask = UIBackgroundTaskInvalid;
}];
}
}
return;
}
.csharpcode, .csharpcode pre
{
font-size: small;
color: black;
font-family: consolas, "Courier New", courier, monospace;
background-color: #ffffff;
/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt
{
background-color: #f4f4f4;
width: 100%;
margin: 0em;
}
.csharpcode .lnum { color: #606060; }
其中的backgroundTask 是成员变量。
.csharpcode, .csharpcode pre
{
font-size: small;
color: black;
font-family: consolas, "Courier New", courier, monospace;
background-color: #ffffff;
/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt
{
background-color: #f4f4f4;
width: 100%;
margin: 0em;
}
.csharpcode .lnum { color: #606060; }
// Use this method to release shared resources, save user data,
// invalidate timers, and store enough application state information to
// restore your application to its current state in case it is terminated later.
// If your application supports background execution,
// this method is called instead of applicationWillTerminate: when the user quits.
if (([[[UIDevice currentDevice] systemVersion] floatValue] >= 6.0))
{
// Acquired additional time
UIDevice *device = [UIDevice currentDevice];
BOOL backgroundSupported = NO;
if ([device respondsToSelector:@selector(isMultitaskingSupported)])
{
backgroundSupported = device.multitaskingSupported;
}
if (backgroundSupported)
{
backgroundTask = [application beginBackgroundTaskWithExpirationHandler:^{
[application endBackgroundTask:backgroundTask];
backgroundTask = UIBackgroundTaskInvalid;
}];
}
}
return;
}
.csharpcode, .csharpcode pre
{
font-size: small;
color: black;
font-family: consolas, "Courier New", courier, monospace;
background-color: #ffffff;
/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt
{
background-color: #f4f4f4;
width: 100%;
margin: 0em;
}
.csharpcode .lnum { color: #606060; }
其中的backgroundTask 是成员变量。
.csharpcode, .csharpcode pre
{
font-size: small;
color: black;
font-family: consolas, "Courier New", courier, monospace;
background-color: #ffffff;
/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt
{
background-color: #f4f4f4;
width: 100%;
margin: 0em;
}
.csharpcode .lnum { color: #606060; }
相关文章推荐
- django实现登录时候输入密码错误5次锁定用户十分钟
- 防止程序崩溃时错误提示对话框弹出
- 求助C程序若输入有误产生的错误
- iOS项目开发中,对后台返回数据为<null>时候的处理,避免取值产生程序崩溃问题
- iOS项目开发中,对后台返回数据为<null>时候的处理,避免取值产生程序崩溃问题
- 论try/catch的重要性,我们经常遇到代码出现无法调试的错误,程序退出的时候崩溃。这跟我们代码日常保护的习惯息息相关。
- django 实现登录时候输入密码错误5次锁定用户十分钟
- 防止程序崩溃时错误提示对话框弹出
- Ubuntu 锁定屏幕后即使输入正确密码也被提示密码错误导致无法解锁 问题的解决
- Android程序开发之防止密码输入错误 密码明文显示功能
- 发布MVC项目到服务器上时候遇到的 模块 DirectoryListingModule 通知 ExecuteRequestHandler 处理程序 StaticFile 错误代码 0x00000000
- iOS开发何如在调试的时候轻松找到程序在哪里崩溃
- MFC移植到WIN764位产生“程序无法正常启动, 0xC000007b”错误
- Android ClearEditText:输入用户名、密码错误时整体删除及输入为空时候晃动提示
- 怎样捕获因字段输入不符EditMask而产生的错误:Invalid input value,use escape key to abandon
- 当程序崩溃的时候怎么办 Part-2
- Python入门小程序:错误锁定
- Java 程序员在写 SQL 程序时候常犯的 10 个错误
- 在开发系统时候运行程序突然报出“WebDev.WebServer40.exe已停止工作”的错误的解决办法
- 防止密码输入错误, 密码明文显示功能