I am implementing a Cocoa Application which is just a simple progress bar that starts when I press a button.The situation is: I can see Animation is Start and Stop when I press the button, but the progress bar will not update the value.
The first is a static component that can never change; it appears on the top of the dialog and is set in the constructor.
loop is running on the main thread, and thus UI updates won't appear until you yield back to the runloop.
You're also going through that loop so quickly that even if you properly dispatched that to a background queue, you wouldn't experience the progress view changing as you iterate through your loop. via GCD or operation queue) and then dispatch UI updates back to the main thread, which is now free to do UI updates.
The dialog waits a configurable amount of time before deciding whether the task at hand is long enough to warrant the dialog. When the current value of the progress bar is greater than or equal to the maximum, as specified in the constructor, the progress monitor dialog closes.
If you need to close the progress monitor early, you can call the while on the event dispatching queue.