{"id":18270520,"url":"https://github.com/lavoy/ALActionBlocks","last_synced_at":"2025-04-05T01:30:39.423Z","repository":{"id":7750739,"uuid":"9118191","full_name":"lavoy/ALActionBlocks","owner":"lavoy","description":"ALActionBlocks Category on UIControl, UIBarButtonItem, and UIGestureRecognizer to allow use of blocks instead of selectors.","archived":false,"fork":false,"pushed_at":"2022-06-11T12:22:45.000Z","size":307,"stargazers_count":227,"open_issues_count":2,"forks_count":23,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-04-03T02:48:21.697Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Objective-C","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/lavoy.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":"2013-03-30T16:01:32.000Z","updated_at":"2024-03-04T08:11:35.000Z","dependencies_parsed_at":"2022-09-13T07:52:18.998Z","dependency_job_id":null,"html_url":"https://github.com/lavoy/ALActionBlocks","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lavoy%2FALActionBlocks","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lavoy%2FALActionBlocks/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lavoy%2FALActionBlocks/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lavoy%2FALActionBlocks/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lavoy","download_url":"https://codeload.github.com/lavoy/ALActionBlocks/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247276022,"owners_count":20912285,"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":[],"created_at":"2024-11-05T11:38:41.412Z","updated_at":"2025-04-05T01:30:39.053Z","avatar_url":"https://github.com/lavoy.png","language":"Objective-C","readme":"# ALActionBlocks\n\nALActionBlocks is an Objective-C category on UIControl, UIBarButtonItem, and UIGestureRecognizer that allows for handling of control events with blocks.\n\n- Handle control events with blocks\n- Remove blocks for control events\n- Gives you a weak reference to your control in the block\n- Works with all of your existing subclasses of UIControl, UIBarButtonItem, and UIGestureRecognizer\n\nThis category was inspired by [Dave DeLong] (https://github.com/davedelong)'s StackOverflow [answer] (http://stackoverflow.com/a/4582061/315074).\n\n#### Simple Example\n\n\n```objc\n#import \"ALActionBlocks.h\"\n```\n```objc\n// Assuming you have a UIButton named 'button'\n[button handleControlEvents:UIControlEventTouchUpInside withBlock:^(id weakControl) {\n    NSLog(@\"button pressed\");\n}];\n```\n\n#### Removing Blocks\n\n```objc\n[button removeActionBlocksForControlEvents:UIControlEventTouchUpInside];\n```\n\nThat's it!\n\n*Check out the demo project for more details.*\n\n\n#### Requirements\n\nALActionBlocks is compatible with [iOS 5.0](http://developer.apple.com/library/ios/#releasenotes/General/WhatsNewIniOS/Articles/iOS5.html) and above.\n\n### ARC\n\nYuuuup!\n\n### Creator\n\n[Andy LaVoy](http://github.com/lavoy)  \n[@lavoy](https://twitter.com/lavoy)\n\n### License\n\nALActionBlocks is available under the [MIT] (http://opensource.org/licenses/MIT) license.\n","funding_links":[],"categories":["etc"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flavoy%2FALActionBlocks","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flavoy%2FALActionBlocks","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flavoy%2FALActionBlocks/lists"}