Skip to content

Commit

Permalink
Release 1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Danil Gontovnik committed Sep 20, 2016
1 parent 8d742ff commit 833b9d5
Show file tree
Hide file tree
Showing 6 changed files with 130 additions and 16 deletions.
1 change: 1 addition & 0 deletions .swift-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.0
9 changes: 5 additions & 4 deletions DGElasticPullToRefresh.podspec
Original file line number Diff line number Diff line change
@@ -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
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0800"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "05CD14641BBE8FEA00AF4030"
BuildableName = "DGElasticPullToRefreshExample.app"
BlueprintName = "DGElasticPullToRefreshExample"
ReferencedContainer = "container:DGElasticPullToRefreshExample.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "05CD14641BBE8FEA00AF4030"
BuildableName = "DGElasticPullToRefreshExample.app"
BlueprintName = "DGElasticPullToRefreshExample"
ReferencedContainer = "container:DGElasticPullToRefreshExample.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "05CD14641BBE8FEA00AF4030"
BuildableName = "DGElasticPullToRefreshExample.app"
BlueprintName = "DGElasticPullToRefreshExample"
ReferencedContainer = "container:DGElasticPullToRefreshExample.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "05CD14641BBE8FEA00AF4030"
BuildableName = "DGElasticPullToRefreshExample.app"
BlueprintName = "DGElasticPullToRefreshExample"
ReferencedContainer = "container:DGElasticPullToRefreshExample.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>SchemeUserState</key>
<dict>
<key>DGElasticPullToRefreshExample.xcscheme</key>
<dict>
<key>orderHint</key>
<integer>0</integer>
</dict>
</dict>
<key>SuppressBuildableAutocreation</key>
<dict>
<key>05CD14641BBE8FEA00AF4030</key>
<dict>
<key>primary</key>
<true/>
</dict>
</dict>
</dict>
</plist>
23 changes: 11 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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 {
Expand All @@ -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:
Expand All @@ -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
Expand All @@ -111,7 +111,6 @@ Danil Gontovnik
- https://twitter.com/gontovnik
- http://gontovnik.com/
- danil@gontovnik.com
- http://iostuts.io/author/danil-gontovnik/

## License

Expand Down

0 comments on commit 833b9d5

Please sign in to comment.