开发者

iPhone Bonjour From Background

I'm developing an iPhone app t开发者_如何学JAVAhat uses Bonjour Services, and I have the following question:

When the app is sent to background, I need to close my Bonjour service; when the app comes to foreground, how do I restart my Bonjour service?

Thanks


You should be able to make use of the UIApplicationDelegate methods. Specifically, I would take a look at applicationDidBecomeActive: and applicationDidEnterBackground:. When it becomes active, start Bonjour; when it enters background, stop it.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜