{"id":2426,"url":"https://github.com/okmr-d/DOAlertController","last_synced_at":"2025-08-02T23:33:30.583Z","repository":{"id":30610363,"uuid":"34165654","full_name":"okmr-d/DOAlertController","owner":"okmr-d","description":"Simple Alert View written in Swift, which can be used as a UIAlertController. (AlertController/AlertView/ActionSheet)","archived":false,"fork":false,"pushed_at":"2020-07-22T15:51:13.000Z","size":99,"stargazers_count":405,"open_issues_count":17,"forks_count":68,"subscribers_count":18,"default_branch":"master","last_synced_at":"2024-11-30T22:56:30.663Z","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/okmr-d.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-04-18T12:49:59.000Z","updated_at":"2024-06-08T03:35:27.000Z","dependencies_parsed_at":"2022-09-08T14:51:26.962Z","dependency_job_id":null,"html_url":"https://github.com/okmr-d/DOAlertController","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/okmr-d%2FDOAlertController","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/okmr-d%2FDOAlertController/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/okmr-d%2FDOAlertController/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/okmr-d%2FDOAlertController/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/okmr-d","download_url":"https://codeload.github.com/okmr-d/DOAlertController/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228143659,"owners_count":17876150,"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.478Z","updated_at":"2024-12-06T17:31:05.043Z","avatar_url":"https://github.com/okmr-d.png","language":"Swift","funding_links":[],"categories":["UI","Content"],"sub_categories":["Alert \u0026 Action Sheet","Other free courses","Alert"],"readme":"# DOAlertController\n\nSimple Alert View written in Swift, which can be used as a UIAlertController replacement.  \nIt supports from iOS7! It is simple and easily customizable!\n\n![BackgroundImage](https://raw.githubusercontent.com/okmr-d/okmr-d.github.io/master/img/DOAlertController/Alert.gif) ![BackgroundImage](https://raw.githubusercontent.com/okmr-d/okmr-d.github.io/master/img/DOAlertController/ActionSheet.gif)\n\n## Easy to use\nDOAlertController can be used as a `UIAlertController`.\n```swift\n// Set title, message and alert style\nlet alertController = DOAlertController(title: \"title\", message: \"message\", preferredStyle: .Alert)\n\n// Create the action.\nlet cancelAction = DOAlertAction(title: \"Cancel\", style: .Cancel, handler: nil)\n\n// You can add plural action.\nlet okAction = DOAlertAction(title: \"OK\" style: .Default) { action in\n    NSLog(\"OK action occured.\")\n}\n\n// Add the action.\nalertController.addAction(cancelAction)\nalertController.addAction(okAction)\n\n// Show alert\npresentViewController(alertController, animated: true, completion: nil)\n```\n\n## Customize\n\n* add TextField (Alert style only)\n* change Fonts\n* change color (Overlay, View, Text, Buttons)\n\n![BackgroundImage](https://raw.githubusercontent.com/okmr-d/okmr-d.github.io/master/img/DOAlertController/CustomAlert.png)\n![BackgroundImage](https://raw.githubusercontent.com/okmr-d/okmr-d.github.io/master/img/DOAlertController/CustomActionSheet.png)\n\n#### Add TextField\n```swift\nalertController.addTextFieldWithConfigurationHandler { textField in\n    // text field(UITextField) setting\n    // ex) textField.placeholder = \"Password\"\n    //     textField.secureTextEntry = true\n}\n```\n\n#### Change Design\n##### Overlay color\n```swift\nalertController.overlayColor = UIColor(red:235/255, green:245/255, blue:255/255, alpha:0.7)\n```\n##### Background color\n```swift\nalertController.alertViewBgColor = UIColor(red:44/255, green:62/255, blue:80/255, alpha:1)\n```\n##### Title (font, text color)\n```swift\nalertController.titleFont = UIFont(name: \"GillSans-Bold\", size: 18.0)\nalertController.titleTextColor = UIColor(red:241/255, green:196/255, blue:15/255, alpha:1)\n```\n##### Message (font, text color)\n```swift\nalertController.messageFont = UIFont(name: \"GillSans-Italic\", size: 15.0)\nalertController.messageTextColor = UIColor.whiteColor()\n```\n##### Button (font, text color, background color(default/highlighted))\n```swift\nalertController.buttonFont[.Default] = UIFont(name: \"GillSans-Bold\", size: 16.0)\nalertController.buttonTextColor[.Default] = UIColor(red:44/255, green:62/255, blue:80/255, alpha:1)\nalertController.buttonBgColor[.Default] = UIColor(red: 46/255, green:204/255, blue:113/255, alpha:1)\nalertController.buttonBgColorHighlighted[.Default] = UIColor(red:64/255, green:212/255, blue:126/255, alpha:1)\n// Default style : [.Default]\n// Cancel style : [.Default] → [.Cancel]\n// Destructive style : [.Default] → [.Destructive]\n```\n\n## Installation\nDOAlertController is available through [CocoaPods](http://cocoapods.org).\n\nTo install add the following line to your Podfile:\n```\npod 'DOAlertController'\n```\n\n## License\nThis software is released under the MIT License, see LICENSE.txt.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fokmr-d%2FDOAlertController","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fokmr-d%2FDOAlertController","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fokmr-d%2FDOAlertController/lists"}