I managed UITableView via NSFetchedResultsController, but all UI blocked(I can do nothing such as tap, scroll…) while NSFetchedResultsController loading data. Is there any solution to resolve this? Thanks!!!
I managed UITableView via NSFetchedResultsController, but all UI blocked(I can do nothing such as
Share
One thing that is important to remember when making your application user friendly is:
Making the Main Thread
UIonly will make sure that theUIwill never freeze, or as you describe it, get “blocked”. Therefore, yourNSFetchedResultsControllershould be on another thread, to ensure that this doesn’t happen.NSOperation‘s is definitely the way to go for the problem you are describing. Here is a tutorial and sample code which will explain a similar scenario, and how to fix it up.Hope that Helps!