开发者

Why doesn't NSOperationQueue execute when declared in a UIView

When I declare a NSOperationQueue member in a UIView subclass, operations send to it won't execute. When the queue is declared in th开发者_C百科e AppDelegate however the same operations are executed. Any ideas?

[EDIT] Ah, fixed it. Problem was my queue initialization was in the initWithFrame, which isn't called when it wakes from a nib. So annoying that these messages to a nil object disappear in void.

Thanks!


There's nothing to prevent an NSOperationQueue from running in a view. As long as you've properly initialized it and added operations to it.

I'd recommend putting a breakpoint on your initialization of the queue, just to make sure that's being execute.

If this doesn't help, add some code to this question and someone will help.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜