{"id":18309271,"url":"https://github.com/globakmaxim/alert","last_synced_at":"2026-05-04T05:33:19.884Z","repository":{"id":62456286,"uuid":"105998409","full_name":"GlobakMaxim/Alert","owner":"GlobakMaxim","description":"Lightweight helper for working with UIAlertController","archived":false,"fork":false,"pushed_at":"2025-04-02T06:02:01.000Z","size":18,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-04-02T07:20:07.714Z","etag":null,"topics":["actionsheet","alert","ios","swift","uialertcontroller"],"latest_commit_sha":null,"homepage":"","language":"Ruby","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/GlobakMaxim.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":"2017-10-06T11:44:51.000Z","updated_at":"2025-04-02T06:02:05.000Z","dependencies_parsed_at":"2022-11-02T00:17:17.512Z","dependency_job_id":null,"html_url":"https://github.com/GlobakMaxim/Alert","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GlobakMaxim%2FAlert","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GlobakMaxim%2FAlert/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GlobakMaxim%2FAlert/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GlobakMaxim%2FAlert/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GlobakMaxim","download_url":"https://codeload.github.com/GlobakMaxim/Alert/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248031319,"owners_count":21036378,"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":["actionsheet","alert","ios","swift","uialertcontroller"],"created_at":"2024-11-05T16:11:00.399Z","updated_at":"2026-05-04T05:33:19.856Z","avatar_url":"https://github.com/GlobakMaxim.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Alert\nLightweight helper for working with UIAlertController\n\n# UIAlertController with beautiful API\n\n```swift\nAlert(title: \"Info\", message: \"Wow\")\n.button(\"Ok\") { print(\"Ok\") }\n.cancel(\"Cancel\")\n.show()\n``` \n\n### .button()\nIt's function with optional style and closure parameters.\n\n#### parameters\n* `title: String`\n* `action: (() -\u003e Void)?`\n\n##### How to use\nAdd empty button with default style and empty action\n```swift\n.button(\"Empty button\")\n```\n\n##### For each style has its own function\n\nFor common `.default` style\n```swift\n.button(\"Ok\") { print(\"Ok button pressed\") }\n```\n\n... for `.cancel`\n```swift\n.cancel(\"Cancel\")\n```\n\nand `.destructive`\n```swift\n.destructive(\"Delete\") { print(\"Delete\") }\n```\n\n### .show()\nShow your alert everywhere\n\nThis function looking for top view controller and show alert controller on it\n\n#### parameters\n* `on viewController: UIViewController?`\n* `animated: Bool`\n* `completion: (() -\u003e Void)?`\n\n#### default parameters\n* `viewController = nil`\n* `animated = true`\n* `completion = nil`\n\n##### How to use\nMost common\n```swift\n.show()\n```\n\nIf you want present alert on current viewController\np.s. This way will save time to search top view controller\n```swift\n.show(on: self)\n```\n\n```swift\n.show(on:self, animated: false)\n```\n\n```swift\n.show(on:self, animated: false) { print(\"Poof\") }\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fglobakmaxim%2Falert","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fglobakmaxim%2Falert","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fglobakmaxim%2Falert/lists"}