{"id":21102124,"url":"https://github.com/vitormesquita/malert","last_synced_at":"2025-04-05T08:07:45.128Z","repository":{"id":46785905,"uuid":"72786630","full_name":"vitormesquita/Malert","owner":"vitormesquita","description":"Custom alert View to iOS applications","archived":false,"fork":false,"pushed_at":"2021-07-13T22:07:42.000Z","size":6680,"stargazers_count":483,"open_issues_count":2,"forks_count":38,"subscribers_count":15,"default_branch":"master","last_synced_at":"2024-04-24T14:48:36.956Z","etag":null,"topics":["alertview","custom-alert","dialog","ios","swift","swift-library"],"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/vitormesquita.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-11-03T21:03:32.000Z","updated_at":"2024-04-16T16:36:32.000Z","dependencies_parsed_at":"2022-09-24T17:20:18.013Z","dependency_job_id":null,"html_url":"https://github.com/vitormesquita/Malert","commit_stats":null,"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vitormesquita%2FMalert","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vitormesquita%2FMalert/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vitormesquita%2FMalert/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vitormesquita%2FMalert/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vitormesquita","download_url":"https://codeload.github.com/vitormesquita/Malert/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247305934,"owners_count":20917208,"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":["alertview","custom-alert","dialog","ios","swift","swift-library"],"created_at":"2024-11-19T23:54:05.643Z","updated_at":"2025-04-05T08:07:45.098Z","avatar_url":"https://github.com/vitormesquita.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv style=\"text-align: center\"\u003e \n\t\u003cimg src=\"./Malert/Assets/Malert_brand.png\"\u003e\n\u003c/div\u003e\n\n[![Platform](https://img.shields.io/cocoapods/p/Malert.svg?style=flat-square)](http://cocoapods.org/pods/Malert)\n[![License](https://img.shields.io/cocoapods/l/Malert.svg?style=flat-square)](http://cocoapods.org/pods/Malert)\n[![Version](https://img.shields.io/cocoapods/v/Malert.svg?style=flat-square)](http://cocoapods.org/pods/Malert)\n\n## A simple, easy and custom iOS UIAlertView written in Swift \n\n\u003cdiv style=\"text-align: center\"\u003e \n\t\u003cimg src=\"./Malert/Assets/mockup.png\"\u003e\n\u003c/div\u003e\n\nMalert came to facilitates custom alert views as `UIAlertController`. Malert allows you to personalize your alertView so that it matches your application layout\n\nTo run the example project, clone the repo, and run `pod install` from the Example directory first.\n\n## Requirements\n\n- Xcode 10.0+\n- Swift 5.0+\n\n## Versioning\n\n- *Swift 3.x*: 1.1.5\n- *Swift 4.0*: 2.0~3.0\n- *Swift 4.2*: 3.1*\n- *Swift 5*: 4.0\n\n## Installation\n\n### Pod\n\nMalert is available through [CocoaPods](http://cocoapods.org). To install\nit, simply add the following line to your Podfile:\n\n```ruby\npod 'Malert'\n```\n### Manually\n\nIf you don't use any dependency managers, you can integrate Malert in your project manually just adding the files which contains [Malert Classes](https://github.com/vitormesquita/Malert/tree/master/Malert/Classes). \n\nCongratulations!!! You can run Malert without any dependency managers!\n\n## Example\n\nThis is a simple example. If you want to know more, check the app Example cause There are more than 10 customizated Malerts.\n\n\u003c!--### Default Malert with title\n\n```swift\nimport Malert\n\n...\n\t\nTODO\n\t\n...\n\t\n```--\u003e\n\n### Malert with custom view\n\n```swift\nimport Malert\n\n...\n\nlet view = ExampleView.instantiateFromNib()\nlet malert = Malert(customView: view)\n\nlet action = MalertAction(title: \"OK\")\naction.tintColor = UIColor(red:0.15, green:0.64, blue:0.85, alpha:1.0)\n\nmalert.addAction(action)\n\npresent(malert, animated: true)\n```\n\n### How to create actions \n\nTo add buttons to your malert There is a function called `addAction` that you need to provide a `MalertAction` object to build customizable buttons.\n\n```swift\nlet malert = ... \n   \t \nlet action = MalertAction(title: \"Take the tour\") {\n   print(\"Closure called when action was clicked\")\n}\n\naction.cornerRadius = 8\naction.tintColor = .white\naction.backgroundColor = UIColor(red:0.38, green:0.76, blue:0.15, alpha:1.0)\n\nmalert.addAction(action)\n\t\n...\n```\n\n**For more details check the examples**\n\n## Customize\n\nMalert provides some attributes to cutomize it:\n\n```swift\n/* Animation attr */\npublic var presentDuration: TimeInterval\npublic var dismissDuration: TimeInterval\npublic var animationType: MalertAnimationType\n\n/* Container attr */\npublic var margin: CGFloat\npublic var cornerRadius: CGFloat\npublic var backgroundColor: UIColor?\n\n/* Title attr */\npublic var titleFont: UIFont\npublic var textColor: UIColor\npublic var textAlign: NSTextAlignment\n\n/* Buttons attr */\npublic var buttonsHeight: CGFloat\npublic var separetorColor: UIColor\npublic var buttonsSpace: CGFloat\npublic var buttonsSideMargin: CGFloat\npublic var buttonsBottomMargin: CGFloat\npublic var buttonsAxis: UILayoutConstraintAxis\n```\n\nIt is very simple how you can do that. Just change malert's attributes ***before*** present it:\n\n```swift\nlet exampleView = ExampleView()\n\nlet alert = Malert(customView: exampleView)\n\n//customizing your malert\n\nalert.animationType = .modalRight\nalert.buttonsSideMargin = 60\nalert.buttonsBottomMargin = 16\nalert.buttonsAxis = .horizontal\nalert.separetorColor = .clear\n```\n\n#### Customize actions\n\nMalert enable some attributes to customize each action:\n\n```swift\npublic var tintColor: UIColor\npublic var backgroundColor: UIColor\npublic var cornerRadius: CGFloat\npublic var borderColor: UIColor\npublic var borderWidth: CGFloat\n```\nIf you need more attributes to customize it, please let us know, create an issue or a pull request. \n\n## Contributing\n\t\nIf you think that we can do the Malert more powerful please contribute with this project. And let's improve it to help other developers.\n\nCreate a pull request or let's talk about something in issues. Thanks a lot.\n\n## Author\n\nVitor Mesquita, vitor.mesquita09@gmail.com\n\n## License\n\nMalert 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%2Fvitormesquita%2Fmalert","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvitormesquita%2Fmalert","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvitormesquita%2Fmalert/lists"}