From 0131a7a4ae3171d317037ce7bd8624afefbab86b Mon Sep 17 00:00:00 2001 From: takasek Date: Sat, 3 Feb 2018 10:50:21 +0900 Subject: [PATCH] :up: update README --- README.md | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 130b913..10c93c0 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ ## Usage -ActionClosurable extends `UIControl`, `UIButton`, `UIGestureRecognizer` and `UIBarButtonItem`. +ActionClosurable extends `UIControl`, `UIButton`, `UIRefreshControl`, `UIGestureRecognizer` and `UIBarButtonItem`. It helps writing swifty code with closure, instead of target and action like below: ```swift @@ -23,6 +23,13 @@ button.onTap { $0.enabled = false } +// UIRefreshControl +tableView.refreshControl = UIRefreshControl { refreshControl in + DispatchQueue.main.asyncAfter(deadline: .now() + 5) { + refreshControl.endRefreshing() + } +} + // UIGestureRecognizer label.addGestureRecognizer(UIPanGestureRecognizer { (gr) in print("UIPanGestureRecognizer fire") @@ -41,8 +48,6 @@ And you can extend any NSObject subclasses in very easy way. [Refer to the sourc ## Installation -### for Swift 3.0 - ActionClosurable is available through [CocoaPods](http://cocoapods.org). To install it, simply add the following line to your Podfile: @@ -55,12 +60,6 @@ ActionClosurable is available through [Carthage](https://github.com/Carthage/Car github "takasek/ActionClosurable" ``` -### for Swift 2.3 - -take a look at the [`Swift-2.3` branch](https://github.com/takasek/ActionClosurable/tree/swift-2.3) - - - ## Author [takasek](https://twitter.com/takasek)