【问题标题】:NSProgressIndicator not showing progressNSProgressIndicator 未显示进度
【发布时间】:2011-11-18 20:19:01
【问题描述】:

我的主运行循环上有一个 for 循环。我试图有一个进度指示器来显示正在发生的事情。问题是 UI 永远没有机会更新。

我查看了NSProgressIndicator progress with For loops?,但我无法使用他们的解决方案。我的 for 循环必须在主线程上 - 否则我程序的其他部分必须与 for 循环串行。

关于如何强制重绘指标的任何想法?

【问题讨论】:

    标签: objective-c cocoa osx-lion nsprogressindicator


    【解决方案1】:

    向您的进度指示器发送displayIfNeeded 消息(NSView 的一种方法)。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2023-03-29
      • 2018-10-27
      • 1970-01-01
      • 2018-08-05
      相关资源
      最近更新 更多