watch OS support

This commit is contained in:
John Estropia
2015-10-20 20:38:58 +09:00
parent 4792c4462e
commit dc8bdf3bad
14 changed files with 433 additions and 42 deletions

View File

@@ -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)
]
}
/**