0
我使用带有两个选项卡的TabBarController
。在第二个我打电话NSOperation
,将操作添加到NSOperationQueue
。当我选择第二个选项卡时,我在主线程上调用了该操作。但是,当我切换到第一个标签的应用程序崩溃。我正确地释放和取消操作切换标签栏时NSOperation失败
我得到BT
#0 0x0243d09b in objc_msgSend()
#1 0x1299c4a0 in ??()
#2 0x008b6d23 in -[__NSOperationInternal start]()
#3 0x008b6a34 in -[NSOperation start]()
#4 0x00943301 in __block_global_6()
#5 0x0222753f in _dispatch_call_block_and_release()
#6 0x02239014 in _dispatch_client_callout()
#7 0x0222a2e8 in _dispatch_root_queue_drain()
#8 0x02229fcb in _dispatch_worker_thread3()
#9 0x99a16b24 in _pthread_wqthread()
#10 0x99a186fe in start_wqthread()
请提出解决方案
这是我的错误,而不是在viewDidDisappear中取消viewwillDisappear中的操作。 – Nassif