mirror of
https://github.com/JohnEstropia/CoreStore.git
synced 2026-01-18 06:57:15 +01:00
watch OS support
This commit is contained in:
@@ -23,7 +23,7 @@
|
||||
// SOFTWARE.
|
||||
//
|
||||
|
||||
#import <CoreData/CoreData.h>
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
FOUNDATION_EXPORT double CoreStoreVersionNumber;
|
||||
FOUNDATION_EXPORT const unsigned char CoreStoreVersionString[];
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
import CoreData
|
||||
|
||||
|
||||
public func +(left: OrderBy, right: OrderBy) -> OrderBy {
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
import CoreData
|
||||
|
||||
|
||||
public func &&(left: Where, right: Where) -> Where {
|
||||
|
||||
@@ -24,6 +24,8 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
import CoreData
|
||||
|
||||
|
||||
// MARK: - CoreStore
|
||||
|
||||
|
||||
@@ -149,7 +149,7 @@ internal final class FetchedResultsControllerDelegate: NSObject, NSFetchedResult
|
||||
|
||||
break
|
||||
}
|
||||
if self.deletedSections.contains(indexPath.section) {
|
||||
if self.deletedSections.contains(indexPath.indexAtPosition(0)) {
|
||||
|
||||
self.handler?.controller(
|
||||
controller,
|
||||
@@ -162,7 +162,7 @@ internal final class FetchedResultsControllerDelegate: NSObject, NSFetchedResult
|
||||
}
|
||||
|
||||
case .Update:
|
||||
guard let section = indexPath?.section else {
|
||||
guard let section = indexPath?.indexAtPosition(0) else {
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
import CoreData
|
||||
|
||||
/**
|
||||
The `NSError` error domain for `CoreStore`.
|
||||
|
||||
@@ -102,7 +102,7 @@ public final class ListMonitor<T: NSManagedObject> {
|
||||
*/
|
||||
public subscript(sectionIndex: Int, itemIndex: Int) -> T {
|
||||
|
||||
return self[NSIndexPath(forItem: itemIndex, inSection: sectionIndex)]
|
||||
return self[NSIndexPath(indexes: [sectionIndex, itemIndex], length: 2)]
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -157,7 +157,10 @@ public final class ListMonitor<T: NSManagedObject> {
|
||||
*/
|
||||
public subscript(safeIndexPath indexPath: NSIndexPath) -> T? {
|
||||
|
||||
return self[safeSectionIndex: indexPath.section, safeItemIndex: indexPath.item]
|
||||
return self[
|
||||
safeSectionIndex: indexPath.indexAtPosition(0),
|
||||
safeItemIndex: indexPath.indexAtPosition(1)
|
||||
]
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
import CoreData
|
||||
import GCDKit
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user