{"id":3050,"url":"https://github.com/takasek/ActionClosurable","last_synced_at":"2025-08-03T13:31:48.216Z","repository":{"id":56901475,"uuid":"56375756","full_name":"takasek/ActionClosurable","owner":"takasek","description":"Extensions which helps to convert objc-style target/action to  swifty closures","archived":false,"fork":false,"pushed_at":"2019-08-13T13:47:15.000Z","size":52,"stargazers_count":124,"open_issues_count":3,"forks_count":15,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-11-18T03:13:39.645Z","etag":null,"topics":["carthage","closure","cocoapods","ios","nsobject","selector","swift","target-action"],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/takasek.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-04-16T09:27:47.000Z","updated_at":"2024-01-14T12:43:09.000Z","dependencies_parsed_at":"2022-08-20T18:50:38.323Z","dependency_job_id":null,"html_url":"https://github.com/takasek/ActionClosurable","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/takasek%2FActionClosurable","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/takasek%2FActionClosurable/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/takasek%2FActionClosurable/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/takasek%2FActionClosurable/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/takasek","download_url":"https://codeload.github.com/takasek/ActionClosurable/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228548567,"owners_count":17935221,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["carthage","closure","cocoapods","ios","nsobject","selector","swift","target-action"],"created_at":"2024-01-05T20:16:29.977Z","updated_at":"2024-12-07T01:30:30.619Z","avatar_url":"https://github.com/takasek.png","language":"Swift","funding_links":[],"categories":["Utility"],"sub_categories":["Web View","Other free courses"],"readme":"# ActionClosurable\n\n[![Version](https://img.shields.io/cocoapods/v/ActionClosurable.svg?style=flat)](http://cocoapods.org/pods/ActionClosurable)\n[![License](https://img.shields.io/cocoapods/l/ActionClosurable.svg?style=flat)](http://cocoapods.org/pods/ActionClosurable)\n[![Platform](https://img.shields.io/cocoapods/p/ActionClosurable.svg?style=flat)](http://cocoapods.org/pods/ActionClosurable)\n[![Carthage Compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)\n\n## Usage\n\nActionClosurable extends `UIControl`, `UIButton`, `UIRefreshControl`, `UIGestureRecognizer` and `UIBarButtonItem`.\nIt helps writing swifty code with closure, instead of target and action like below:\n\n```swift\n// UIControl\nbutton.on(.touchDown) {\n    $0.backgroundColor = UIColor.redColor()\n}\nbutton.on(.touchUpOutside) {\n    $0.backgroundColor = UIColor.whiteColor()\n}\n// UIButton\nbutton.onTap {\n    $0.enabled = false\n}\n\n// UIRefreshControl\ntableView.refreshControl = UIRefreshControl { refreshControl in\n    DispatchQueue.main.asyncAfter(deadline: .now() + 5) {\n        refreshControl.endRefreshing()\n    }\n}\n\n// UIGestureRecognizer\nlabel.addGestureRecognizer(UIPanGestureRecognizer { (gr) in\n    print(\"UIPanGestureRecognizer fire\")\n})\n\n// UIBarButtonItem\nlet barButtonItem = UIBarButtonItem(title: \"title\", style: .plain) { _ in\n    print(\"barButtonItem title\")\n}\n\n// And you can easily extend any NSObject subclasses!\n```\n\nAnd you can extend any NSObject subclasses in very easy way. [Refer to the source.](https://github.com/takasek/ActionClosurable/blob/master/ActionClosurable/Extensions.swift)\n\n\n## Installation\n\nActionClosurable is available through [CocoaPods](http://cocoapods.org). To install\nit, simply add the following line to your Podfile:\n\n```ruby\npod \"ActionClosurable\"\n```\nActionClosurable is available through [Carthage](https://github.com/Carthage/Carthage). To install it, simply add the following line to your Cartfile:\n\n```ruby\ngithub \"takasek/ActionClosurable\"\n```\n\nActionClosurable is available through [Swift Package Manager](https://github.com/apple/swift-package-manager). To install it, add dependency in `Package.swift`:\n\n```swift\nlet package = Package(\n    ...\n    dependencies: [\n         .package(url: \"git@github.com:takasek/ActionClosurable.git\", from: \"2.1.0\"),\n    ],\n    ...\n)\n```\n\n## Author\n\n[takasek](https://twitter.com/takasek)\n\n## License\n\nActionClosurable is available under the MIT license. See the LICENSE file for more info.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftakasek%2FActionClosurable","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftakasek%2FActionClosurable","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftakasek%2FActionClosurable/lists"}