开发者

Running Secondary Threads in Background Continuosly

I need to create a new thread which will have infinite while loop, so that it won't block main UI th开发者_开发问答read. The newly created thread is getting killed when I send the application to background mode, But I need to run it in background. Any help?


There is a difference between a Background Thread and a Background Task in iOS, but the underlying answer remains the same; don't run a background thread unless you simply cannot avoid it. Furthermore, you can't just spin off a thread and have it run if your app wants to support backgrounding in iOS.

First, you should read the documentation. It is extensive and provides many examples.

Then, if you have any specific questions not covered by the docs (or to clarify the docs), ask 'em here!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜