mirror of
https://github.com/JohnEstropia/CoreStore.git
synced 2026-01-11 20:00:30 +01:00
mainContext ? Can I access it? #66
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @wm-j-ray on GitHub (May 30, 2016).
John,
I have a collection of predicates that I'd like to use to create NSFetchedResultsControllers. I realize this is defeating a lot of the purpose of CoreStore, but nonetheless. I've tried:
CoreStore.mainContext and CoreStore.defaultStack.mainContext
@JohnEstropia commented on GitHub (May 31, 2016):
You can use
NSFetchedResultsController.createFor(...)to create a CoreStore-managed controller:If you have raw
NSPredicateandNSSortDescriptors,Whereclauses andOrderByclauses accept them in their initializers@wm-j-ray commented on GitHub (May 31, 2016):
Thanks John. I'm learning albeit slowly.
On May 30, 2016, 6:21 PM -0400, John Estropianotifications@github.com, wrote:
@JohnEstropia commented on GitHub (May 31, 2016):
If you don't need an
NSFetchedResultsControllerper se, I recommend you useListMonitors instead. They're much more type-safe and handles a lot of NSFetchedResultsController bugs, and they also support "multiple delegates".@wm-j-ray commented on GitHub (May 31, 2016):
I'm going to give it a shot. I want to start playing around with that DTTableManager library that abstracts out a lot of the lower level mechanics of tableviews and its just pure FRC. (At first blush).
I used to use TLIndexPathTools, very good but it's ObjC and I am trying to make the transition to Swift and get more toward a Clean Swift architecture.
Again, thanks so much for the help.
On May 30, 2016, 10:03 PM -0400, John Estropianotifications@github.com, wrote:
@JohnEstropia commented on GitHub (May 31, 2016):
If your app still have Objective-C code left you might want to play with CoreStore 2.0 (see corestore2_develop branch).
All CoreStore Swift types have their ObjectiveC counterparts (and bridgeable back and forth).
Just to give you more options :)
I'll close this issue for now. Feel free to ask anything else anytime!