diff --git a/.swift-version b/.swift-version
new file mode 100644
index 0000000..9f55b2c
--- /dev/null
+++ b/.swift-version
@@ -0,0 +1 @@
+3.0
diff --git a/DGElasticPullToRefresh.podspec b/DGElasticPullToRefresh.podspec
index ee89b24..9de0d3a 100644
--- a/DGElasticPullToRefresh.podspec
+++ b/DGElasticPullToRefresh.podspec
@@ -1,16 +1,17 @@
Pod::Spec.new do |spec|
spec.name = "DGElasticPullToRefresh"
- spec.version = "1.0.3"
+ spec.version = "1.1"
spec.authors = { "Danil Gontovnik" => "gontovnik.danil@gmail.com" }
spec.homepage = "https://github.com/gontovnik/DGElasticPullToRefresh"
spec.summary = "Elastic pull to refresh compontent developed in Swift"
- spec.source = { :git => "https://github.com/gontovnik/DGElasticPullToRefresh.git" }
+ spec.source = { :git => "https://github.com/gontovnik/DGElasticPullToRefresh.git",
+ :tag => '1.1' }
spec.license = { :type => "MIT", :file => "LICENSE" }
- spec.platform = :ios, '7.0'
+ spec.platform = :ios, '8.0'
spec.source_files = "DGElasticPullToRefresh/*.swift"
spec.requires_arc = true
- spec.ios.deployment_target = '7.0'
+ spec.ios.deployment_target = '8.0'
spec.ios.frameworks = ['UIKit', 'Foundation']
end
diff --git a/DGElasticPullToRefreshExample.xcodeproj/project.xcworkspace/xcuserdata/gontovnik.xcuserdatad/UserInterfaceState.xcuserstate b/DGElasticPullToRefreshExample.xcodeproj/project.xcworkspace/xcuserdata/gontovnik.xcuserdatad/UserInterfaceState.xcuserstate
new file mode 100644
index 0000000..89e2013
Binary files /dev/null and b/DGElasticPullToRefreshExample.xcodeproj/project.xcworkspace/xcuserdata/gontovnik.xcuserdatad/UserInterfaceState.xcuserstate differ
diff --git a/DGElasticPullToRefreshExample.xcodeproj/xcuserdata/gontovnik.xcuserdatad/xcschemes/DGElasticPullToRefreshExample.xcscheme b/DGElasticPullToRefreshExample.xcodeproj/xcuserdata/gontovnik.xcuserdatad/xcschemes/DGElasticPullToRefreshExample.xcscheme
new file mode 100644
index 0000000..0c9023c
--- /dev/null
+++ b/DGElasticPullToRefreshExample.xcodeproj/xcuserdata/gontovnik.xcuserdatad/xcschemes/DGElasticPullToRefreshExample.xcscheme
@@ -0,0 +1,91 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/DGElasticPullToRefreshExample.xcodeproj/xcuserdata/gontovnik.xcuserdatad/xcschemes/xcschememanagement.plist b/DGElasticPullToRefreshExample.xcodeproj/xcuserdata/gontovnik.xcuserdatad/xcschemes/xcschememanagement.plist
new file mode 100644
index 0000000..485401d
--- /dev/null
+++ b/DGElasticPullToRefreshExample.xcodeproj/xcuserdata/gontovnik.xcuserdatad/xcschemes/xcschememanagement.plist
@@ -0,0 +1,22 @@
+
+
+
+
+ SchemeUserState
+
+ DGElasticPullToRefreshExample.xcscheme
+
+ orderHint
+ 0
+
+
+ SuppressBuildableAutocreation
+
+ 05CD14641BBE8FEA00AF4030
+
+ primary
+
+
+
+
+
diff --git a/README.md b/README.md
index ba57f70..c0ddcb7 100644
--- a/README.md
+++ b/README.md
@@ -12,7 +12,7 @@ Tutorial on how this bounce effect was achieved can be found [here](http://iostu
* Xcode 7 or higher
* iOS 8.0 or higher (may work on previous versions, just did not test it)
* ARC
-* Swift 2.0
+* Swift 3.0
## Demo
@@ -38,14 +38,14 @@ let loadingView = DGElasticPullToRefreshLoadingViewCircle()
loadingView.tintColor = UIColor(red: 78/255.0, green: 221/255.0, blue: 200/255.0, alpha: 1.0)
tableView.dg_addPullToRefreshWithActionHandler({ [weak self] () -> Void in
// Add your logic here
- // Do not forget to call dg_stopLoading() at the end
+ // Do not forget to call dg_stopLoading() at the end
self?.tableView.dg_stopLoading()
}, loadingView: loadingView)
tableView.dg_setPullToRefreshFillColor(UIColor(red: 57/255.0, green: 67/255.0, blue: 89/255.0, alpha: 1.0))
tableView.dg_setPullToRefreshBackgroundColor(tableView.backgroundColor!)
```
-Do not forget to remove pull to refresh on view controller deinit. It is a temporary solution.
+Do not forget to remove pull to refresh on view controller deinit. It is a temporary solution.
``` swift
deinit {
@@ -58,21 +58,21 @@ deinit {
Add pull to refresh without loading view:
``` swift
-func dg_addPullToRefreshWithActionHandler(actionHandler: () -> Void)
+func dg_addPullToRefreshWithActionHandler(_ actionHandler: @escaping () -> Void)
```
Add pull to refresh with loading view:
``` swift
-func dg_addPullToRefreshWithActionHandler(actionHandler: () -> Void, loadingView: DGElasticPullToRefreshLoadingView?)
+func dg_addPullToRefreshWithActionHandler(_ actionHandler: @escaping () -> Void, loadingView: DGElasticPullToRefreshLoadingView?)
```
You can use built-in *DGElasticPullToRefreshLoadingViewCircle* or create your own by subclassing **DGElasticPullToRefreshLoadingView** and implementing these methods:
``` swift
-func setPullProgress(progress: CGFloat) { }
-func startAnimating() { }
-func stopLoading() { }
+func setPullProgress(_ progress: CGFloat)
+func startAnimating()
+func stopLoading()
```
Remove pull to refresh:
@@ -90,13 +90,13 @@ func dg_startLoading()
Change pull to refresh background color:
``` swift
-func dg_setPullToRefreshBackgroundColor(color: UIColor)
+func dg_setPullToRefreshBackgroundColor(_ color: UIColor)
```
Change pull to refresh fill color:
-``` swift
-func dg_setPullToRefreshFillColor(color: UIColor)
+``` swift
+func dg_setPullToRefreshFillColor(_ color: UIColor)
```
## Contribution
@@ -111,7 +111,6 @@ Danil Gontovnik
- https://twitter.com/gontovnik
- http://gontovnik.com/
- danil@gontovnik.com
-- http://iostuts.io/author/danil-gontovnik/
## License