I am using a NSFetchedResultsController to populate a UITableView. The fetch take some time so I would like to present a spinning wheel to the user while the fetch is under way.
How would I do that?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You should start your spinner in the Main thread and push the “heavy work” for a secondary thread. When the work is done, stop the spinner. You can achieve that with something like this:
Doing the following in the Main thread wont make you accomplish what you want:
When the Heavy work begins, it will block your UI thread, so you won’t actually see the
UIActivityMonitoranimating.To finish I would advise you using this as spinner.