开发者

how should you cancel an NSInvocationOperation so that your code stops?

I have a background thread that goes off to a server and gets XML which then renders it to a graph.

I have an NSTimer which fires off a request every 5 seconds, what is typically the best way to s开发者_如何学Ctop the execution of a thread altogether (if at all possible), I know you can subclass NSInvocationOperation and implement the cancel method, but I dont know what exactly to do, other that put if (hasBeenCancelled) return; statements everywhere throughout the code...

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜