Skip to content

Commit

Permalink
1.1.4
Browse files Browse the repository at this point in the history
加入release action的接口
  • Loading branch information
ronghaopger committed May 24, 2016
1 parent a1659c2 commit 4c43fbb
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 3 deletions.
7 changes: 7 additions & 0 deletions Demo/Demo/EasyPull/UIScrollView+EasyPull.swift
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,13 @@ extension UIScrollView {
Observer.unableUpExcuting()
}

/**
release all of action
*/
public func easy_releaseAll() {
Observer.dropAction = nil
Observer.upAction = nil
}

// MARK: private method
private func addContentOffsetObserver() {
Expand Down
2 changes: 1 addition & 1 deletion EasyPull.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "EasyPull"
s.version = "1.1.3"
s.version = "1.1.4"
s.summary = "Let pull-to-refresh Easy for any UIScrollView in Swift"
s.homepage = "https://github.com/ronghaopger/EasyPull"
s.license = "MIT"
Expand Down
Binary file not shown.
7 changes: 7 additions & 0 deletions EasyPull/EasyPull/UIScrollView+EasyPull.swift
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,13 @@ extension UIScrollView {
Observer.unableUpExcuting()
}

/**
release all of action
*/
public func easy_releaseAll() {
Observer.dropAction = nil
Observer.upAction = nil
}

// MARK: private method
private func addContentOffsetObserver() {
Expand Down
15 changes: 13 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ Note: You can enable/unable Up-Pull using this method. Suitable for scenes witho
func unableUpExcuting()
```

### Customization
### Customization (自定义)

The pull-to-refresh view can be customized using the following methods:

Expand All @@ -72,6 +72,17 @@ Or implement the `EasyViewAutomatic` protocol when you prefer the Automatic mode

(see sample Xcode project in `/Demo/MyCusyomView.swift` or `/Demo/EasyPull/DefaultView.swift`)


### Note (注意)

释放所有的Action,避免循环引用cycle retain。

```Swift
func easy_releaseAll()
```

当App要离开某一个使用了EasyPull的viewController时,记得releaseAll哦

## Installation

### CocoaPods
Expand All @@ -81,7 +92,7 @@ source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
use_frameworks!

pod 'EasyPull', '~> 1.1.3'
pod 'EasyPull', '~> 1.1.4'
```

### Source files
Expand Down

0 comments on commit 4c43fbb

Please sign in to comment.