{"id":18272047,"url":"https://github.com/zoul/Lambda-Alert","last_synced_at":"2025-04-05T02:30:53.736Z","repository":{"id":944481,"uuid":"721716","full_name":"zoul/Lambda-Alert","owner":"zoul","description":"Simple UIAlertView wrapper that uses blocks for button actions.","archived":true,"fork":false,"pushed_at":"2014-11-11T17:38:15.000Z","size":261,"stargazers_count":99,"open_issues_count":2,"forks_count":11,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-04-04T00:34:44.297Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://github.com/zoul/Lambda-Alert","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/zoul.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2010-06-15T08:30:07.000Z","updated_at":"2025-01-27T19:27:19.000Z","dependencies_parsed_at":"2022-08-16T11:35:09.772Z","dependency_job_id":null,"html_url":"https://github.com/zoul/Lambda-Alert","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zoul%2FLambda-Alert","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zoul%2FLambda-Alert/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zoul%2FLambda-Alert/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zoul%2FLambda-Alert/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zoul","download_url":"https://codeload.github.com/zoul/Lambda-Alert/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247279327,"owners_count":20912866,"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:39:40.899Z","updated_at":"2025-04-05T02:30:53.320Z","avatar_url":"https://github.com/zoul.png","language":"Objective-C","funding_links":[],"categories":["etc"],"sub_categories":[],"readme":"λ-alert\n-------\n\nThis repo contains two simple wrappers around `UIAlertView` and `UIActionSheet`\nthat allow you to use blocks for actions, so that you don’t have to mess with\ndelegate callbacks and button indexes. Please note that since iOS 8 you should\nuse the official [`UIAlertController`](http://nshipster.com/uialertcontroller/) instead.\n\nInstalling\n----------\n\nThis project includes a `podspec` for usage with [CocoaPods](http://cocoapods.org/). Simply add\n\n    pod 'Lambda-Alert'\n\nto your `Podfile` and run `pod install`.\n\nAlternately, you can add all of the files contained in this project's `Library` directory to your Xcode project. If your project does not use ARC, you will need to enable ARC on these files. You can enable ARC per-file by adding the -fobjc-arc flag, as described on [a common StackOverflow question](http://stackoverflow.com/questions/6646052/how-can-i-disable-arc-for-a-single-file-in-a-project).\n\nFinally, you could clone the whole repository and drag the project to an Xcode workspace. Then you can add libLambdaAlert to the list of linked libraries for your target and start using the code.\n\nUsage\n-----\n\nDisplaying an alert:\n\n    CCAlertView *alert = [[CCAlertView alloc]\n        initWithTitle:@\"Test Alert\"\n        message:@\"See if the thing works.\"];\n    [alert addButtonWithTitle:@\"Foo\" block:^{ NSLog(@\"Foo\"); }];\n    [alert addButtonWithTitle:@\"Bar\" block:^{ NSLog(@\"Bar\"); }];\n    [alert addButtonWithTitle:@\"Cancel\" block:NULL];\n    [alert show];\n\nDisplaying a sheet:\n\n    CCActionSheet *sheet = [[CCActionSheet alloc] initWithTitle:@\"Action Sheet\"];\n    [sheet addButtonWithTitle:@\"Miles\" block:^{ NSLog(@\"Trumpet\"); }];\n    [sheet addButtonWithTitle:@\"Trane\" block:^{ NSLog(@\"Saxophone\"); }];\n    [sheet addDestructiveButtonWithTitle:@\"Monk\" block:^{ NSLog(@\"Piano\"); }];\n    [sheet addCancelButtonWithTitle:@\"Back to the Head\"];\n    [sheet showInView:window];\n\nThe alert will keep itself from being deallocated until closed.\n\nExtra features\n--------------\n\n* Both classes feature a `dismissAction` block that will be called when the\n  dialog is dismissed, be it with a button tap, cancelling or dismissing\n  through the `-dismissAnimated:` method.\n* Both classes have a `-dismissAnimated:` method that will dismiss the dialog\n  without pressing any of the buttons. This method does not perform the cancel\n  button action, but it *does* call the `dismissAction` block mentioned in the\n  previous bullet.\n* You can also dismiss the dialog by posting a notification to the standard\n  notification center. The name of the notification is documented in the header\n  files. If you want the dismissal to be animated, include a `userInfo`\n  dictionary with the notification that returns an appropriate `NSNumber`\n  instance for `CCActionSheetAnimatedKey` or `CCAlertViewAnimatedKey`. The\n  notification triggers `-dismissAnimated:`, so the notes above apply.\n\nLinks\n-----\n\n* [Programming with C Blocks][1] by Joachim Bengtsson\n* [Practical Blocks][2] by Mike Ash\n\n[1]: http://thirdcog.eu/pwcblocks/\n[2]: http://www.mikeash.com/pyblog/friday-qa-2009-08-14-practical-blocks.html\n\nAuthor \u0026 License\n----------------\n\nLicensed under the terms of the [MIT License][mit]:\n\nCopyright © Tomáš Znamenáček, \u003ctomas.znamenacek@gmail.com\u003e\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the “Software”), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nThe software is provided “as is”, without warranty of any kind, express or\nimplied, including but not limited to the warranties of merchantability,\nfitness for a particular purpose and noninfringement. In no event shall the\nauthors or copyright holders be liable for any claim, damages or other\nliability, whether in an action of contract, tort or otherwise, arising from,\nout of or in connection with the Software or the use or other dealings in\nthe Software.\n\n[mit]: http://www.opensource.org/licenses/mit-license.php\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzoul%2FLambda-Alert","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzoul%2FLambda-Alert","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzoul%2FLambda-Alert/lists"}