All Projects → takasek → Actionclosurable

takasek / Actionclosurable

Licence: mit
Extensions which helps to convert objc-style target/action to swifty closures

Programming Languages

swift
15916 projects

Projects that are alternatives of or similar to Actionclosurable

Actionkit
Easy, closure-based Swift methods for working with interactive UIKit elements.
Stars: ✭ 255 (+112.5%)
Mutual labels:  carthage, closure, selector
Nextgrowingtextview
📝 The next in the generations of 'growing textviews' optimized for iOS 8 and above.
Stars: ✭ 1,540 (+1183.33%)
Mutual labels:  cocoapods, carthage
Shari
Shari is the alternative to the library of UIPickerView(drum roll) in Swift. You can select a item using UITableView.
Stars: ✭ 111 (-7.5%)
Mutual labels:  cocoapods, carthage
Sqift
Powerful Swift wrapper for SQLite
Stars: ✭ 119 (-0.83%)
Mutual labels:  cocoapods, carthage
Microfeatures Example
📦📱 Example of iOS app built using the uFeatures architecture
Stars: ✭ 112 (-6.67%)
Mutual labels:  cocoapods, carthage
Buckets Swift
Swift Collection Data Structures Library
Stars: ✭ 106 (-11.67%)
Mutual labels:  cocoapods, carthage
Device
Light weight tool for detecting the current device and screen size written in swift.
Stars: ✭ 1,503 (+1152.5%)
Mutual labels:  cocoapods, carthage
Sdwebimagewebpcoder
A WebP coder plugin for SDWebImage, use libwebp
Stars: ✭ 101 (-15.83%)
Mutual labels:  cocoapods, carthage
Nvactivityindicatorview
A collection of awesome loading animations
Stars: ✭ 10,031 (+8259.17%)
Mutual labels:  cocoapods, carthage
Alamofire
Elegant HTTP Networking in Swift
Stars: ✭ 36,896 (+30646.67%)
Mutual labels:  cocoapods, carthage
Fontawesome.swift
Use FontAwesome in your Swift projects
Stars: ✭ 1,513 (+1160.83%)
Mutual labels:  cocoapods, carthage
Ccnpreferenceswindowcontroller
CCNPreferencesWindowController is an Objective-C subclass of NSWindowController that automatically manages your custom view controllers for handling app preferences.
Stars: ✭ 105 (-12.5%)
Mutual labels:  cocoapods, carthage
Tkdotsegment
TKDotSegment is a segment with dot animation
Stars: ✭ 103 (-14.17%)
Mutual labels:  cocoapods, carthage
Swifty360player
iOS 360-degree video player streaming from an AVPlayer.
Stars: ✭ 118 (-1.67%)
Mutual labels:  cocoapods, carthage
Rdgliderviewcontroller Swift
Control for a floating view gliding over a ViewController Edit
Stars: ✭ 102 (-15%)
Mutual labels:  cocoapods, carthage
Fscalendar
A fully customizable iOS calendar library, compatible with Objective-C and Swift
Stars: ✭ 9,829 (+8090.83%)
Mutual labels:  cocoapods, carthage
Szmentionsswift
Library to help handle mentions
Stars: ✭ 109 (-9.17%)
Mutual labels:  cocoapods, carthage
Cardsstack
An awesome set of cards at your disposal ✌️ ⚡️
Stars: ✭ 97 (-19.17%)
Mutual labels:  cocoapods, carthage
Puzzlemaker
Swift framework responsible for generating puzzles from the image
Stars: ✭ 99 (-17.5%)
Mutual labels:  cocoapods, carthage
Swifterswift
A handy collection of more than 500 native Swift extensions to boost your productivity.
Stars: ✭ 10,706 (+8821.67%)
Mutual labels:  cocoapods, carthage

ActionClosurable

Version License Platform Carthage Compatible

Usage

ActionClosurable extends UIControl, UIButton, UIRefreshControl, UIGestureRecognizer and UIBarButtonItem. It helps writing swifty code with closure, instead of target and action like below:

// UIControl
button.on(.touchDown) {
    $0.backgroundColor = UIColor.redColor()
}
button.on(.touchUpOutside) {
    $0.backgroundColor = UIColor.whiteColor()
}
// UIButton
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")
})

// UIBarButtonItem
let barButtonItem = UIBarButtonItem(title: "title", style: .plain) { _ in
    print("barButtonItem title")
}

// And you can easily extend any NSObject subclasses!

And you can extend any NSObject subclasses in very easy way. Refer to the source.

Installation

ActionClosurable is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod "ActionClosurable"

ActionClosurable is available through Carthage. To install it, simply add the following line to your Cartfile:

github "takasek/ActionClosurable"

ActionClosurable is available through Swift Package Manager. To install it, add dependency in Package.swift:

let package = Package(
    ...
    dependencies: [
         .package(url: "[email protected]:takasek/ActionClosurable.git", from: "2.1.0"),
    ],
    ...
)

Author

takasek

License

ActionClosurable is available under the MIT license. See the LICENSE file for more info.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].