{"id":2415,"url":"https://github.com/thellimist/EZAlertController","last_synced_at":"2025-08-06T16:30:54.079Z","repository":{"id":52152145,"uuid":"46009681","full_name":"thellimist/EZAlertController","owner":"thellimist","description":"Easy Swift UIAlertController","archived":false,"fork":false,"pushed_at":"2023-05-12T09:21:09.000Z","size":160,"stargazers_count":366,"open_issues_count":4,"forks_count":49,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-12-06T03:10:40.847Z","etag":null,"topics":[],"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/thellimist.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,"governance":null,"roadmap":null,"authors":null}},"created_at":"2015-11-11T21:02:52.000Z","updated_at":"2024-08-12T13:35:44.000Z","dependencies_parsed_at":"2024-01-02T21:24:51.195Z","dependency_job_id":null,"html_url":"https://github.com/thellimist/EZAlertController","commit_stats":{"total_commits":58,"total_committers":16,"mean_commits":3.625,"dds":"0.39655172413793105","last_synced_commit":"235b78ae4477e4ff413485c17e3ef69e58a32261"},"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thellimist%2FEZAlertController","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thellimist%2FEZAlertController/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thellimist%2FEZAlertController/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thellimist%2FEZAlertController/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thellimist","download_url":"https://codeload.github.com/thellimist/EZAlertController/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228923684,"owners_count":17992566,"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-01-05T20:16:13.216Z","updated_at":"2024-12-09T16:31:00.248Z","avatar_url":"https://github.com/thellimist.png","language":"Swift","funding_links":[],"categories":["UI","Libs","Swift","UI and SwiftUI","UI [🔝](#readme)"],"sub_categories":["Alert \u0026 Action Sheet","UI","Other free courses"],"readme":"EZAlertController\n==============\n[![CocoaPods Compatible](https://img.shields.io/cocoapods/v/EZAlertController.svg)](https://img.shields.io/cocoapods/v/EZAlertController.svg)\n\nEasy Swift UIAlertController\n\n- One line setup for all UIAlertControllers\n- Button action with closures instead of selectors\n- Easily customizable\n- Easy action sheets\n\n*Swift 2.0 is maintained in [this](https://github.com/thellimist/EZAlertController/tree/2.x) branch*\n\n## Usage\n\n### One Button Alert\n\n```swift\nEZAlertController.alert(\"Title\")\nEZAlertController.alert(\"Title\", message: \"Message\")\nEZAlertController.alert(\"Title\", message: \"Message\", acceptMessage: \"OK\") { () -\u003e () in\n    print(\"cliked OK\")\n}\n```\n![EZAlertController](http://i.imgur.com/OpKVypB.png)\n\n### Multiple Button Alerts\n\n```swift\nEZAlertController.alert(\"Title\", message: \"Message\", buttons: [\"First\", \"Second\"]) { (alertAction, position) -\u003e Void in\n    if position == 0 {\n        print(\"First button clicked\")\n    } else if position == 1 {\n        print(\"Second button clicked\")\n    }\n}\n```\n![EZAlertController](http://i.imgur.com/Qwgg71G.png)\n\n```swift\n// With Preferred Button Style along with all alerts in a single closure\n// Here the Logout button will be red in color to show that it is a destructive action\nEZAlertController.alert(\"Title\", message: \"Message\", buttons: [\"Cancel\",\"Logout\"], buttonsPreferredStyle:[.default, .destructive]) { (alert, position) in \n    if position == 0 {\n        print(\"Cancel button clicked\")\n    } else if position == 1 {\n        print(\"Logout button clicked\")\n    }\n}\n```\n![IMG_0920](https://user-images.githubusercontent.com/40712137/65062275-545b3d00-d999-11e9-88cc-ff03ba17410a.jpg)\n\n### Action Sheet\n\n```swift\n// With individual UIAlertAction objects\nlet firstButtonAction = UIAlertAction(title: \"First Button\", style: UIAlertActionStyle.Default, handler: { (UIAlertAction) -\u003e Void in\n    print(\"First Button pressed\")\n})\nlet secondButtonAction = UIAlertAction(title: \"Second Button\", style: UIAlertActionStyle.Default, handler: { (UIAlertAction) -\u003e Void in\n    print(\"Second Button pressed\")\n})\n\nEZAlertController.actionSheet(\"Title\", message: \"message\", actions: [firstButtonAction, secondButtonAction])\n\n// With all actions in single closure\nEZAlertController.actionSheet(\"Title\", message: \"Message\", buttons: [\"First\", \"Second\"]) { (alertAction, position) -\u003e Void in\n    if position == 0 {\n        print(\"First button clicked\")\n    } else if position == 1 {\n        print(\"Second button clicked\")\n    }\n}\n```\n\n![EZAlertController](http://i.imgur.com/uv32LYJ.png)\n\n### Customizable\n\n```swift\nlet alertController = EZAlertController.alert(\"Title\") // Returns UIAlertController\nalertController.setValue(attributedTitle, forKey: \"attributedTitle\")\nalertController.setValue(attributedMessage, forKey: \"attributedMessage\")\nalertController.view.tintColor =  self.view.tintColor\n...\n```\n\n### Objective-C support\n\n```objective-c\n#import \"ProjectName-Swift.h\"\n\n...\n\n[EZAlertController alert:@\"Title\" message:@\"Message\"];\n```\n\n### Requirements\n\n- Swift version 4.0\n\n## Installation\n\n### Install via CocoaPods\n\nYou can use [CocoaPods](http://cocoapods.org/) to install `EZAlertController` by adding it to your `Podfile`:\n```ruby\nplatform :ios, '8.0'\nuse_frameworks!\n\npod 'EZAlertController', '3.2'\n```\n\nFor current master branch \n```\npod 'EZAlertController', :git =\u003e \"https://github.com/thellimist/EZAlertController.git\", :branch =\u003e 'master'\n```\n\n### Install Manually\n\n- Download and drop 'EZAlertController.swift' in your project.\n\n## Improvement\n- Feel free sending pull requests.\n\n## License\n- EZAlertController is available under the MIT license. See the [LICENSE file](https://github.com/thellimist/EZAlertController/blob/master/LICENSE).\n\n## Keywords\nswift, alert, AlertView, AlertViewController, UIAlertView, UIAlertViewController\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthellimist%2FEZAlertController","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthellimist%2FEZAlertController","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthellimist%2FEZAlertController/lists"}