diff --git a/Demo.xcodeproj/project.pbxproj b/Demo.xcodeproj/project.pbxproj index ca631a1..b91d68a 100644 --- a/Demo.xcodeproj/project.pbxproj +++ b/Demo.xcodeproj/project.pbxproj @@ -958,7 +958,7 @@ PRODUCT_BUNDLE_IDENTIFIER = "com.sample.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_SWIFT3_OBJC_INFERENCE = On; + SWIFT_SWIFT3_OBJC_INFERENCE = Default; SWIFT_VERSION = 4.0; }; name = Debug; @@ -975,7 +975,7 @@ PRODUCT_BUNDLE_IDENTIFIER = "com.sample.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - SWIFT_SWIFT3_OBJC_INFERENCE = On; + SWIFT_SWIFT3_OBJC_INFERENCE = Default; SWIFT_VERSION = 4.0; }; name = Release; diff --git a/Library/Helper.swift b/Library/Helper.swift index fb590f2..d6fb227 100644 --- a/Library/Helper.swift +++ b/Library/Helper.swift @@ -29,9 +29,9 @@ public class Helper: NSObject { let letters = "ABCDEFGHIJKL" var string = "" for _ in 0 ... 5 { - let token = UInt32(letters.characters.count) + let token = UInt32(letters.count) let letterIndex = Int(arc4random_uniform(token)) - let firstChar = Array(letters.characters)[letterIndex] + let firstChar = Array(letters)[letterIndex] string.append(firstChar) } diff --git a/Source/DATASource+NSFetchedResultsControllerDelegate.swift b/Source/DATASource+NSFetchedResultsControllerDelegate.swift index e0f9a11..8533804 100644 --- a/Source/DATASource+NSFetchedResultsControllerDelegate.swift +++ b/Source/DATASource+NSFetchedResultsControllerDelegate.swift @@ -61,14 +61,14 @@ extension DATASource: NSFetchedResultsControllerDelegate { } break case .update: - if let indexPath = indexPath { - if tableView.indexPathsForVisibleRows?.index(of: indexPath) != nil { - if let cell = tableView.cellForRow(at: indexPath) { - self.configure(cell, indexPath: indexPath) + if let newIndexPath = newIndexPath { + if tableView.indexPathsForVisibleRows?.index(of: newIndexPath) != nil { + if let cell = tableView.cellForRow(at: newIndexPath) { + self.configure(cell, indexPath: newIndexPath) } if let anObject = anObject as? NSManagedObject { - self.delegate?.dataSource?(self, didUpdateObject: anObject, atIndexPath: indexPath) + self.delegate?.dataSource?(self, didUpdateObject: anObject, atIndexPath: newIndexPath) } } }