简体   繁体   中英

iOS5 core data fetch freezes the app

Starting from iOS5, my app started to freeze when using fetchedResultsController . I have attached the debugger result after quitting the simulator.

在此处输入图片说明

Any help will be appreciated.

Thanks

You say in the comments that you're using performSelectorInBackground: to update tableviews. This isn't right, all code affecting the UI should be executed on the main thread.

In addition (and I think this is what's causing the problem) you mustn't reuse a MOC across threads. Each thread must have its own MOC, which can then use the same NSPersistentStoreCoordinator .

You should read Apple's guide on this topic .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM