From f6210aa95880e501329f0f253414a2433c5a7214 Mon Sep 17 00:00:00 2001 From: Denys Telezhkin Date: Fri, 10 Apr 2015 17:34:53 +0300 Subject: [PATCH] drop XCode 6.2 and lower, adopt Swift 1.2, use DTModelStorage 1.2.0 --- DTTableViewManager.podspec | 4 ++-- ...emoryStorage_DTTableViewManagerAdditions.h | 7 ------- DTTableViewManager/DTTableViewController.h | 11 +--------- Example/Podfile.lock | 20 +++++++++---------- .../TableViewFactory/Cells/NumberCell.swift | 2 +- README.md | 3 ++- 6 files changed, 16 insertions(+), 31 deletions(-) diff --git a/DTTableViewManager.podspec b/DTTableViewManager.podspec index 1c1ca6e4..5db4b462 100644 --- a/DTTableViewManager.podspec +++ b/DTTableViewManager.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'DTTableViewManager' - s.version = '3.0.5' + s.version = '3.1.0' s.license = 'MIT' s.summary = 'The most simple and robust way to manage UITableView.' s.homepage = 'https://github.com/DenHeadless/DTTableViewManager' @@ -12,5 +12,5 @@ Pod::Spec.new do |s| s.ios.deployment_target = '7.0' s.ios.frameworks = 'UIKit', 'Foundation' s.platform = :ios,'7.0' - s.dependency 'DTModelStorage' , '~> 1.1.2' + s.dependency 'DTModelStorage' , '~> 1.2.0' end \ No newline at end of file diff --git a/DTTableViewManager/DTMemoryStorage_DTTableViewManagerAdditions.h b/DTTableViewManager/DTMemoryStorage_DTTableViewManagerAdditions.h index ff22d610..7cd5d4af 100644 --- a/DTTableViewManager/DTMemoryStorage_DTTableViewManagerAdditions.h +++ b/DTTableViewManager/DTMemoryStorage_DTTableViewManagerAdditions.h @@ -25,12 +25,7 @@ #import -#if __has_feature(nullability) // Xcode 6.3+ #pragma clang assume_nonnull begin -#else -#define nullable -#define __nullable -#endif /** This category is used to adapt DTMemoryStorage for table view models. It adds UITableView specific methods like moving items between indexPaths and moving sections in UITableView. @@ -77,6 +72,4 @@ @end -#if __has_feature(nullability) #pragma clang assume_nonnull end -#endif diff --git a/DTTableViewManager/DTTableViewController.h b/DTTableViewManager/DTTableViewController.h index f47f396f..abca2f5a 100644 --- a/DTTableViewManager/DTTableViewController.h +++ b/DTTableViewManager/DTTableViewController.h @@ -27,14 +27,7 @@ #import "DTMemoryStorage_DTTableViewManagerAdditions.h" #import "DTTableViewControllerEvents.h" -#if __has_feature(nullability) // Xcode 6.3+ #pragma clang assume_nonnull begin -#else -#define nullable -#define __nullable -#define __null_unspecified -#define null_resettable -#endif typedef NS_ENUM(NSUInteger,DTTableViewSectionStyle) { @@ -72,7 +65,7 @@ typedef NS_ENUM(NSUInteger,DTTableViewSectionStyle) @return DTMemoryStorage instance. */ -- (__null_unspecified DTMemoryStorage *)memoryStorage; +- (null_unspecified DTMemoryStorage *)memoryStorage; /** Searching data storage object. It will be created automatically, responding to changes in UISearchBar, or after method filterTableItemsForSearchString:inScope: is called. @@ -249,6 +242,4 @@ typedef NS_ENUM(NSUInteger,DTTableViewSectionStyle) @end -#if __has_feature(nullability) #pragma clang assume_nonnull end -#endif diff --git a/Example/Podfile.lock b/Example/Podfile.lock index 4a42f6ca..81d8d7f9 100644 --- a/Example/Podfile.lock +++ b/Example/Podfile.lock @@ -1,15 +1,15 @@ PODS: - Cedar (0.11.1) - - DTModelStorage (HEAD based on 1.1.2): - - DTModelStorage/All (= HEAD based on 1.1.2) - - DTModelStorage/All (HEAD based on 1.1.2): + - DTModelStorage (HEAD based on 1.2.0): + - DTModelStorage/All (= HEAD based on 1.2.0) + - DTModelStorage/All (HEAD based on 1.2.0): - DTModelStorage/Core - DTModelStorage/CoreDataStorage - DTModelStorage/MemoryStorage - - DTModelStorage/Core (HEAD based on 1.1.2) - - DTModelStorage/CoreDataStorage (HEAD based on 1.1.2): + - DTModelStorage/Core (HEAD based on 1.2.0) + - DTModelStorage/CoreDataStorage (HEAD based on 1.2.0): - DTModelStorage/Core - - DTModelStorage/MemoryStorage (HEAD based on 1.1.2): + - DTModelStorage/MemoryStorage (HEAD based on 1.2.0): - DTModelStorage/Core - OCMock (2.2.4) @@ -19,8 +19,8 @@ DEPENDENCIES: - OCMock (~> 2.2) SPEC CHECKSUMS: - Cedar: 16fce41646511e08a488bac8f196f97f54184ed7 - DTModelStorage: 3542ba5bee1d3654924abeccd8cb8733c5e278e7 - OCMock: 6db79185520e24f9f299548f2b8b07e41d881bd5 + Cedar: 95007bec7e0339ea6c21b1a4858a45c25cbe8f09 + DTModelStorage: cf3faf432601537fbaed823cc9cc9b2dd912a19e + OCMock: a6a7dc0e3997fb9f35d99f72528698ebf60d64f2 -COCOAPODS: 0.36.0 +COCOAPODS: 0.36.3 diff --git a/Example/TableViewFactory/Cells/NumberCell.swift b/Example/TableViewFactory/Cells/NumberCell.swift index 452c536f..054ca5b6 100644 --- a/Example/TableViewFactory/Cells/NumberCell.swift +++ b/Example/TableViewFactory/Cells/NumberCell.swift @@ -13,7 +13,7 @@ class NumberCell: UITableViewCell, DTModelTransfer { @IBOutlet weak var label: UILabel! func updateWithModel(model: AnyObject) { - let number = model as Int + let number = model as! Int label.text = number.description } } diff --git a/README.md b/README.md index ff2f3a3d..82cd7a32 100644 --- a/README.md +++ b/README.md @@ -105,6 +105,7 @@ DTTableViewManager has a built-in search system, that is easy to use and flexibl ## Requirements +* XCode 6.3 and higher * iOS 7.x, 8.x * ARC @@ -112,7 +113,7 @@ DTTableViewManager has a built-in search system, that is easy to use and flexibl Simplest option is to use [CocoaPods](http://www.cocoapods.org): - pod 'DTTableViewManager', '~> 3.0.0' + pod 'DTTableViewManager', '~> 3.1.0' ## Documentation