{"id":2435,"url":"https://github.com/krimpedance/KRAlertController","last_synced_at":"2025-08-02T23:33:41.857Z","repository":{"id":56917506,"uuid":"52807554","full_name":"krimpedance/KRAlertController","owner":"krimpedance","description":"A colored alert view for your iOS.","archived":true,"fork":false,"pushed_at":"2018-11-09T10:08:11.000Z","size":162,"stargazers_count":52,"open_issues_count":0,"forks_count":6,"subscribers_count":7,"default_branch":"master","last_synced_at":"2024-11-16T03:04:51.495Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/krimpedance.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":"2016-02-29T16:53:45.000Z","updated_at":"2023-01-28T15:17:40.000Z","dependencies_parsed_at":"2022-08-20T21:20:18.780Z","dependency_job_id":null,"html_url":"https://github.com/krimpedance/KRAlertController","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/krimpedance%2FKRAlertController","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krimpedance%2FKRAlertController/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krimpedance%2FKRAlertController/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krimpedance%2FKRAlertController/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/krimpedance","download_url":"https://codeload.github.com/krimpedance/KRAlertController/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228503222,"owners_count":17930543,"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.705Z","updated_at":"2024-12-06T17:31:07.228Z","avatar_url":"https://github.com/krimpedance.png","language":"Swift","funding_links":[],"categories":["UI","Libs","UI [🔝](#readme)"],"sub_categories":["Alert \u0026 Action Sheet","UI","Other free courses"],"readme":"[日本語](./README_Ja.md)\n\n# KRAlertController\n\n[![Version](https://img.shields.io/cocoapods/v/KRAlertController.svg?style=flat)](http://cocoapods.org/pods/KRAlertController)\n[![License](https://img.shields.io/cocoapods/l/KRAlertController.svg?style=flat)](http://cocoapods.org/pods/KRAlertController)\n[![Platform](https://img.shields.io/cocoapods/p/KRAlertController.svg?style=flat)](http://cocoapods.org/pods/KRAlertController)\n[![Download](https://img.shields.io/cocoapods/dt/KRAlertController.svg?style=flat)](http://cocoapods.org/pods/KRAlertController)\n[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)\n[![CI Status](http://img.shields.io/travis/krimpedance/KRAlertController.svg?style=flat)](https://travis-ci.org/krimpedance/KRAlertController)\n\n`KRAlertController` is a beautiful and easy-to-use alert controller for your iOS written by Swift.\n\n\u003cimg src=\"https://github.com/krimpedance/Resources/blob/master/KRAlertController/styles.png\" height=300\u003e\n\n## Requirements\n- iOS 10.0+\n- Xcode 10.0+\n- Swift 4.2+\n\n## DEMO\nTo run the example project, clone the repo, and open `KRAlertControllerDemo.xcodeproj` from the DEMO directory.\n\nor [appetize.io](https://appetize.io/app/jc2066a1jncndy2uet7wkp0ykg)\n\n## Installation\nKRAlertController is available through [CocoaPods](http://cocoapods.org) and [Carthage](https://github.com/Carthage/Carthage).\nTo install it, simply add the following line to your Podfile or Cartfile:\n\n```ruby\n# Podfile\npod \"KRAlertController\"\n```\n\n```ruby\n# Cartfile\ngithub \"Krimpedance/KRAlertController\"\n```\n\n## Usage\n(see sample Xcode project in /Demo)\n\n**Mainly the same as UIAlertController.**\n\nAt first, import `KRAlertController` in your swift file.\n\nShow simple alert.\n\n```Swift\nKRAlertController(title: \"Title\", message: \"message\")\n  .addCancel()\n  .addAction(\"OK\") { action, textFields in\n    print(\"OK\")\n  }\n  .show()\n```\n\n### Initializer\n```Swift\ninit(title: String?, message: String?, style: KRAlertControllerStyle = .Alert)\n```\n\n### Alert types\nThere is 7 kinds of alert.\n`icon` pass true to display glaph icon; otherwise, pass false.\nDefault view controller to display alert is visible view controller of key window.\n```Swift\nfunc show(presentingVC: UIViewController? = nil, animated: Bool = true, completion: (() -\u003e ())? = nil)\nfunc showSuccess(icon icon: Bool, presentingVC: UIViewController? = nil, animated: Bool = true, completion: (() -\u003e ())? = nil)\nfunc showInformation(icon icon: Bool, presentingVC: UIViewController? = nil, animated: Bool = true, completion: (() -\u003e ())? = nil)\nfunc showWarning(icon icon: Bool, presentingVC: UIViewController? = nil, animated: Bool = true, completion: (() -\u003e ())? = nil)\nfunc showError(icon icon: Bool, presentingVC: UIViewController? = nil, animated: Bool = true, completion: (() -\u003e ())? = nil)\nfunc showEdit(icon icon: Bool, presentingVC: UIViewController? = nil, animated: Bool = true, completion: (() -\u003e ())? = nil)\nfunc showAuthorize(icon icon: Bool, presentingVC: UIViewController? = nil, animated: Bool = true, completion: (() -\u003e ())? = nil)\n```\n\n```Swift\n// Example\nalert.showSuccess(true)\nalert.showWarning(true, presentingVC: self, animated: false) {\n  print(\"Showed warning alert!\")\n}\n```\n\n## Contributing to this project\nI'm seeking bug reports and feature requests.\n\n## Release Note\n+ 3.1.0\n  - Compatible with Swift 4.2.\n\n+ 3.0.1\n  - Compatible with Swift 4.1.\n\n+ 3.0.0\n  - Supported Xcode9 and Swift4.\n\n## License\nKRAlertController is available under the MIT license. See the LICENSE file for more info.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkrimpedance%2FKRAlertController","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkrimpedance%2FKRAlertController","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkrimpedance%2FKRAlertController/lists"}