やっと動いた ProgressIndicator
なぜか根性かまされたのか、中々動かなかったProgressIndicator のメモ。
InterfaceBuilder での設定
styleはSpinning、「Display When Stopped」だけにチェックをする。
コーディング
progressLoopが表示しているProgressIndicatorのインスタンス。
// 描画周りの処理 [progressLoop setHidden:NO]; [progressLoop setAnimationDelay:1/12]; [progressLoop startAnimation:self]; while ([myTask isRunning]) { sleep(1); } [progressLoop stopAnimation:self]; [progressLoop setHidden:YES]; [self display];
こんな感じでやっと動いた。