本文介绍了wait_fences:未能收到答复:10004003错误-具有UIActivityIndi​​catorView的UIAlertView的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望对压榨西姆丽姆的问题可以解决我的问题,因为我也有一个没有文本字段的UIAlertView,但是效果不佳。代替文本字段,我在其上放置了一个UIActivityIndi​​catorView动画,并且在创建时不使用任何按钮。因此,警报会以编程方式被取消,以便委托方法会破坏警报上的微调器以及警报本身(在运行期间一直保留)。

I hoped that the answers to squeezemylime's question would solve my problem as I also have a UIAlertView without text field but it did not work out well. Instead of a text field I placed a UIActivityIndicatorView animating on it and no buttons used on creation. So the alert gets programmatically dismissed so that the delegate method destroys the spinner on the alert and the alert itself (which has been retained through the time running).

所以,我在调试器中也收到了这些 wait_fences:消息,同时我被冻结了,因为我尝试的所有操作(包括该线程中的宝贵提示)都不会杀死这些 wait_fences:消息。

So, I'm getting also these wait_fences: messages within the debugger and I'm frozen in the meantime because everything I tried including the valuable hints in this thread won't kill these wait_fences: messages. There is no crash, neither with GDB nor on the device.

逐步执行代码,我意识到 wait_fences:消息直接显示在 dismissWithClickedButtonIndex:0动画的代理:否释放有问题的UIAlertView。然后我认为它可能类似于 squeezemylime 的延迟技术,并执行以下操作:

Stepping through the code I realized that wait_fences: message is shown directly after the delegate for dismissWithClickedButtonIndex:0 animated:NO releases the questionable UIAlertView. Then I thought it could be similar to squeezemylime's delay technique and did this:

[theAlertObj performSelector:@selector(dismissWithClickedButtonIndex:animated:) withObject:nil afterDelay:0.1];

wait_fences:消息消失了!但是对 dismissWithClickedButtonIndex:animated:的调用无法满足,因为它缺少第二个参数 animated:NO -因此,我尝试了一些更改,实现了呼叫:

and the wait_fences: message was gone! But the call to dismissWithClickedButtonIndex:animated: can't be satisfied because it is missing the second argument animated:NO - so I tried it with some changes implementing a method for the call:

- (void)dismissNamedAlert: (UIAlertView*)alert
{
    [alert dismissWithClickedButtonIndex:0 animated:NO];
}

- (void)postProcessLogicalWork: (id)arg
{
    [self performSelector:@selector(dismissNamedAlert:) withObject:theAlertObj afterDelay:0.2];
    ...
}

笨蛋: wait_fences:消息再次出现!我想我无法回到工作解决方案中有一个不满意的方法调用-那么该怎么做?和/或在什么情况下会出现这些 wait_fences:消息?

Bummer: the wait_fences: message re-appeared! I think I can't go back to the working solution having an unsatisfied method call - so how can it be done? And/or under which circumstances do these wait_fences: messages occur?

简而言之,我的工作流程是这样的:

Briefly the workflow for my thing is like this:


  • viewDidAppear调用其 super ,然后调用我的数据更新程序 afterDelay:0.3f

  • 数据更新程序为更新过程调用新线程

  • 新线程创建并在主线程上显示带有微调器的警报,然后运行几秒钟
  • >
  • 新线程在主线程上执行整理过程,并完成

  • 整理器如上所述解除警报(使用 wait_fences:并在需要时刷新显示

  • 其余时间为空闲时间...暂时

  • viewDidAppear calls its super and then my data updater afterDelay:0.3f
  • the data updater invokes a new thread for the update procedure
  • the new thread creates and displays the alert with spinner on the main thread and then runs for some seconds
  • the new thread performs a finishing procedure on the main thread and is done
  • the finisher dismisses the alert as described above (with wait_fences:) and refreshes the display if needed
  • the rest is idle time ... for the moment being

有什么想法吗?

推荐答案

我不知道事情发生的原因,但要解决这个问题通过更改此行来解决问题

I don't know the reason why thing happens but sort out this problem by changing this line

[alert dismissWithClickedButtonIndex:0 animated:NO];

为此

[alert dismissWithClickedButtonIndex:0 animated:YES];

这篇关于wait_fences:未能收到答复:10004003错误-具有UIActivityIndi​​catorView的UIAlertView的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-07 04:43