Iphone 如何在后台使用UIWebview
我想设置Iphone 如何在后台使用UIWebview,iphone,xcode,multithreading,uiwebview,background,Iphone,Xcode,Multithreading,Uiwebview,Background,我想设置UIWebview始终在后台运行。 当iPhone输入“ApplicationIdentinterBackground”时,UIWebview不工作。 因此,我希望UIWebview始终在后台运行。 有可能吗?每个应用程序在终止前都可以在后台继续执行大约10分钟。只有某些应用程序可以在后台继续执行,如音频/gps/蓝牙等相关应用程序。你可以找到更多 下面的代码示例来自应用程序文档,可以帮助您入门- - (void)applicationDidEnterBackground:(UIAppl
UIWebview
始终在后台运行。
当iPhone输入“ApplicationIdentinterBackground
”时,UIWebview
不工作。
因此,我希望UIWebview
始终在后台运行。
有可能吗?每个应用程序在终止前都可以在后台继续执行大约10分钟。只有某些应用程序可以在后台继续执行,如音频/gps/蓝牙等相关应用程序。你可以找到更多 下面的代码示例来自应用程序文档,可以帮助您入门-
- (void)applicationDidEnterBackground:(UIApplication *)application
{
bgTask = [application beginBackgroundTaskWithExpirationHandler:^{
// Clean up any unfinished task business by marking where you.
// stopped or ending the task outright.
[application endBackgroundTask:bgTask];
bgTask = UIBackgroundTaskInvalid;
}];
// Start the long-running task and return immediately.
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
// Do the work associated with the task, preferably in chunks.
[application endBackgroundTask:bgTask];
bgTask = UIBackgroundTaskInvalid;
});
}
我想[这个链接][1]可能会对你有所帮助。[1]: