{"id":16886678,"url":"https://github.com/alisoftware/ohalertview","last_synced_at":"2025-04-11T14:05:21.721Z","repository":{"id":9958205,"uuid":"11979652","full_name":"AliSoftware/OHAlertView","owner":"AliSoftware","description":"UIAlertView subclass that uses blocks to handle its callback (which make the code much more easier and readable) ","archived":false,"fork":false,"pushed_at":"2015-12-23T13:41:30.000Z","size":40,"stargazers_count":16,"open_issues_count":2,"forks_count":8,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-01-05T08:52:28.590Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/AliSoftware.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":"2013-08-08T15:25:16.000Z","updated_at":"2019-06-16T10:28:59.000Z","dependencies_parsed_at":"2022-09-01T16:21:15.913Z","dependency_job_id":null,"html_url":"https://github.com/AliSoftware/OHAlertView","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AliSoftware%2FOHAlertView","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AliSoftware%2FOHAlertView/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AliSoftware%2FOHAlertView/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AliSoftware%2FOHAlertView/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AliSoftware","download_url":"https://codeload.github.com/AliSoftware/OHAlertView/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":233753246,"owners_count":18724821,"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-10-13T16:40:43.322Z","updated_at":"2025-01-13T14:10:14.101Z","avatar_url":"https://github.com/AliSoftware.png","language":"Objective-C","readme":"[![Version](http://cocoapod-badges.herokuapp.com/v/OHAlertView/badge.png)](http://cocoadocs.org/docsets/OHAlertView)\n[![Platform](http://cocoapod-badges.herokuapp.com/p/OHAlertView/badge.png)](http://cocoadocs.org/docsets/OHAlertView)\n\n\n## About this class\n\nThis class make it easier to use Alert Views with blocks, and make the transition between `UIAlertView` (iOS \u003c 8.0) to UIAlertController (iOS 8.0+)\n\nThis allows you to provide directly the code to execute (as a block) in return to the tap on a button,\ninstead of declaring a delegate and implementing the corresponding methods.\n\nThis also has the huge advantage of **simplifying the code especially when using multiple `UIAlertViews`** in the same object (as in such case, it is not easy to have a clean code if you share the same delegate)\n\n_Note: You may also be interested in [OHActionSheet](https://github.com/AliSoftware/OHActionSheet)_\n\n## Usage Example\n\n    [OHAlertView showAlertWithTitle:@\"Alert Demo\"\n                            message:@\"You like this sample?\"\n                       cancelButton:@\"No\"\n                       otherButtons:@[@\"Yes\"]\n                      buttonHandler:^(OHAlertView* alert, NSInteger buttonIndex)\n     {\n         NSLog(@\"button tapped: %d\",buttonIndex);\n     \n         if (buttonIndex == alert.cancelButtonIndex) {\n             NSLog(@\"No\");\n         } else {\n             NSLog(@\"Yes\");\n         }\n     }];\n     \n\n## CocoaPods\n\nThis class is referenced in CocoaPods, so you can simply add `pod OHAlertView` to your Podfile to add it to your pods.\n\n## Compatibility Notes\n\n* This class uses blocks, which is a feature introduced in iOS 4.0.\n* This class uses ARC.\n* This class internally uses `UIAlertView` if you are targeting iOS \u003c 8.0, and use `UIAlertController` if you are targeting iOS8 or above\n\n## License\n\nThis code is under MIT License.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falisoftware%2Fohalertview","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falisoftware%2Fohalertview","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falisoftware%2Fohalertview/lists"}