diff --git a/AlecrimCoreData.podspec b/AlecrimCoreData.podspec index f3c6b68..bb18ec9 100644 --- a/AlecrimCoreData.podspec +++ b/AlecrimCoreData.podspec @@ -1,7 +1,7 @@ Pod::Spec.new do |s| s.name = "AlecrimCoreData" - s.version = "4.2.4" + s.version = "4.2.5" s.summary = "A powerful and simple Core Data wrapper framework written in Swift." s.homepage = "https://github.com/Alecrim/AlecrimCoreData" diff --git a/README.md b/README.md index e9db0cc..912c3fe 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,11 @@ ![AlecrimCoreData](https://raw.githubusercontent.com/Alecrim/AlecrimCoreData/master/AlecrimCoreData.png) -[![Language: Swift](https://img.shields.io/badge/lang-Swift-orange.svg?style=flat)](https://developer.apple.com/swift/) +[![Language: Swift](https://img.shields.io/badge/lang-Swift 2.3-orange.svg?style=flat)](https://developer.apple.com/swift/) +[![Platform](https://img.shields.io/cocoapods/p/AlecrimCoreData.svg?style=flat)](http://cocoadocs.org/docsets/AlecrimCoreData) [![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg?style=flat)](https://raw.githubusercontent.com/Alecrim/AlecrimCoreData/develop/LICENSE) [![CocoaPods](https://img.shields.io/cocoapods/v/AlecrimCoreData.svg?style=flat)](http://cocoapods.org) -[![Forks](https://img.shields.io/github/forks/Alecrim/AlecrimCoreData.svg?style=flat)](https://github.com/Alecrim/AlecrimCoreData/network) -[![Stars](https://img.shields.io/github/stars/Alecrim/AlecrimCoreData.svg?style=flat)](https://github.com/Alecrim/AlecrimCoreData/stargazers) +[![Apps](https://img.shields.io/cocoapods/at/AlecrimCoreData.svg?style=flat)](http://cocoadocs.org/docsets/AlecrimCoreData) +[![Twitter](https://img.shields.io/badge/twitter-@vmartinelli-blue.svg?style=flat)](https://twitter.com/vmartinelli) A powerful and simple Core Data wrapper framework written in Swift. @@ -297,7 +298,7 @@ Since **AlecrimCoreData** version 4 the `DataContext` is an `NSManagedObjectCont - Swift 2.3 - Xcode 8 -- OS X 10.9 / iOS 8.0 / watchOS 2.0 +- OS X 10.10 / iOS 8.0 / tvOS 9.0 / watchOS 2.0 ### Installation @@ -314,11 +315,12 @@ $ gem install cocoapods To integrate AlecrimCoreData into your Xcode project using CocoaPods, specify it in your `Podfile`: ```ruby -source 'https://github.com/CocoaPods/Specs.git' -platform :ios, '8.0' +platform :ios, '9.0' use_frameworks! -pod 'AlecrimCoreData' +target '' do + pod 'AlecrimCoreData', '4.2.5' +end ``` Then, run the following command: diff --git a/Source/AlecrimCoreData.xcodeproj/project.pbxproj b/Source/AlecrimCoreData.xcodeproj/project.pbxproj index 8c05d33..3645deb 100644 --- a/Source/AlecrimCoreData.xcodeproj/project.pbxproj +++ b/Source/AlecrimCoreData.xcodeproj/project.pbxproj @@ -415,7 +415,7 @@ APPLICATION_EXTENSION_API_ONLY = YES; CLANG_ENABLE_MODULES = YES; COMBINE_HIDPI_IMAGES = YES; - CURRENT_PROJECT_VERSION = 581; + CURRENT_PROJECT_VERSION = 583; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; @@ -439,7 +439,7 @@ APPLICATION_EXTENSION_API_ONLY = YES; CLANG_ENABLE_MODULES = YES; COMBINE_HIDPI_IMAGES = YES; - CURRENT_PROJECT_VERSION = 581; + CURRENT_PROJECT_VERSION = 583; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; diff --git a/Source/AlecrimCoreData/Core/Extensions/NSCollectionViewExtensions.swift b/Source/AlecrimCoreData/Core/Extensions/NSCollectionViewExtensions.swift index efcb202..58ef39c 100644 --- a/Source/AlecrimCoreData/Core/Extensions/NSCollectionViewExtensions.swift +++ b/Source/AlecrimCoreData/Core/Extensions/NSCollectionViewExtensions.swift @@ -45,13 +45,7 @@ extension FetchRequestController { } .willChangeContent { if !reloadData { - insertedSectionIndexes.removeAllIndexes() - deletedSectionIndexes.removeAllIndexes() - updatedSectionIndexes.removeAllIndexes() - - insertedItemIndexPaths.removeAll(keepCapacity: false) - deletedItemIndexPaths.removeAll(keepCapacity: false) - updatedItemIndexPaths.removeAll(keepCapacity: false) + reset() } } .didInsertSection { sectionInfo, sectionIndex in diff --git a/Source/AlecrimCoreData/Core/Extensions/UICollectionViewExtensions.swift b/Source/AlecrimCoreData/Core/Extensions/UICollectionViewExtensions.swift index 75c27da..86a74b7 100644 --- a/Source/AlecrimCoreData/Core/Extensions/UICollectionViewExtensions.swift +++ b/Source/AlecrimCoreData/Core/Extensions/UICollectionViewExtensions.swift @@ -44,13 +44,7 @@ extension FetchRequestController { } .willChangeContent { if !reloadData { - insertedSectionIndexes.removeAllIndexes() - deletedSectionIndexes.removeAllIndexes() - updatedSectionIndexes.removeAllIndexes() - - insertedItemIndexPaths.removeAll(keepCapacity: false) - deletedItemIndexPaths.removeAll(keepCapacity: false) - updatedItemIndexPaths.removeAll(keepCapacity: false) + reset() } } .didInsertSection { sectionInfo, sectionIndex in diff --git a/Source/AlecrimCoreData/Core/Extensions/UITableViewExtensions.swift b/Source/AlecrimCoreData/Core/Extensions/UITableViewExtensions.swift index 1b29a49..3b498c2 100644 --- a/Source/AlecrimCoreData/Core/Extensions/UITableViewExtensions.swift +++ b/Source/AlecrimCoreData/Core/Extensions/UITableViewExtensions.swift @@ -44,11 +44,7 @@ extension FetchRequestController { } .willChangeContent { if !reloadData { - // reset() - - // - tableView.beginUpdates() } } .didInsertSection { sectionInfo, sectionIndex in @@ -112,18 +108,22 @@ extension FetchRequestController { } } .didChangeContent { [weak tableView] in + // + defer { reset() } + + // guard let tableView = tableView else { - reset() return } // if reloadData { tableView.reloadData() - reset() } else { + tableView.beginUpdates() + if deletedSectionIndexes.count > 0 { tableView.deleteSections(deletedSectionIndexes, withRowAnimation: rowAnimation) } @@ -157,8 +157,6 @@ extension FetchRequestController { } } } - - reset() } } diff --git a/Source/AlecrimCoreData/Info.plist b/Source/AlecrimCoreData/Info.plist index 9c043a8..41b5841 100644 --- a/Source/AlecrimCoreData/Info.plist +++ b/Source/AlecrimCoreData/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 4.2.4 + 4.2.5 CFBundleSignature ???? CFBundleVersion