I am having a logical problem. I don’t know how to run 2 things at the same time.
What I want to do:
When the user dismiss a button(UIAlertView), an action will be performed. This action takes min. 2 minutes. This is quite long, so I would like to ADD a progressbar to tell the user the progress.
I know how to create a ProgressView/Bar, but I don’t know how to combine the Progressbar with NSTask.
I run an NSTask and during this I want to load a progress view 🙂
Can anyone help me? 🙂
Thank you.
I tried this using while (nstask and such) but the while/for statements are for boolean only 🙂
Is there a boolean method for NSTask? like (task hasFinished) or something?
All code that interacts with the user interface must run on the main thread to guarantee stability, all other things however may be run on a separate thread.
To run a background task simply use: