I have an iOS application using coredata with three different models. The data is pulled from a json feed from a server then saved. Each API call is run on a thread using NSOperationQueue so they never execute at the same time. On the final call I save to the largest model being stored it is after the save happens that the application hangs. The UI becomes unresponsive and the debugger gives no errors. This only happens on the first load of the app, afterwards every subsequent load runs perfect. I have tried loading only the final api call and the error still happens. I receive the delegate callback controllerDidChangeContent: and do nothing in the method. I am stumped. Thank you folks for you assistance.
相关问题
- Core Data lightweight migration crashes after App
- How can I implement password recovery in an iPhone
- State preservation and restoration strategies with
- “Zero out” sensitive String data in Swift
- Get the NSRange for the visible text after scroll
相关文章
- 现在使用swift开发ios应用好还是swift?
- UITableView dragging distance with UIRefreshContro
- TCC __TCCAccessRequest_block_invoke
- Where does a host app handle NSExtensionContext#co
- Swift - hide pickerView after value selected
- How do you detect key up / key down events from a
- didBeginContact:(SKPhysicsContact *)contact not in
- Attempt to present UIAlertController on View Contr
It is "freezing" your app because you are most likely merging the save back to the main
NSManagedObjectContext
via theNSManagedObjectContextDidChangeNotification
. This is known limitation prior to iOS 5.0.Either you can update to 5.0 and use the parent child MOC design that was added or you can skip merging the contexts and
-reset
the main context and force it to reload relevant data after the save.