I am a brand new Mac programmer and I need help on how to use NSProgressIndicator
. I already looked for sample code, but couldn't find anything that helped.
What I want to do is this:
-(IBAction)startProgressBar:(id)sender; {
//I want to make the bar update itself by the value of 1 until it is at the value of 100
//Example: add 1 to bar every second until it is full
}
I think
performSelector:withObject:afterDelay
will help you here.Write a method that will increment your progress bar. At the end of that method call
performSelector:withObject:afterDelay
on the same method with a delay of 1 second until the bar is full.You probably won't need to pass an object to that method, so you can just use nil.
EDIT
In your case I would recommend something like this: