{"id":2430,"url":"https://github.com/dimillian/PopupViewController","last_synced_at":"2025-08-02T23:33:30.948Z","repository":{"id":62451020,"uuid":"60685037","full_name":"Dimillian/PopupViewController","owner":"Dimillian","description":"UIViewController drop in replacement with much more customisation","archived":false,"fork":false,"pushed_at":"2016-10-13T10:20:25.000Z","size":230,"stargazers_count":21,"open_issues_count":0,"forks_count":4,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-11-25T18:42:55.542Z","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/Dimillian.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-06-08T09:15:12.000Z","updated_at":"2022-06-27T09:00:30.000Z","dependencies_parsed_at":"2022-11-01T22:32:08.664Z","dependency_job_id":null,"html_url":"https://github.com/Dimillian/PopupViewController","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dimillian%2FPopupViewController","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dimillian%2FPopupViewController/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dimillian%2FPopupViewController/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dimillian%2FPopupViewController/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Dimillian","download_url":"https://codeload.github.com/Dimillian/PopupViewController/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228503211,"owners_count":17930539,"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.585Z","updated_at":"2024-12-06T17:31:05.097Z","avatar_url":"https://github.com/Dimillian.png","language":"Swift","readme":"# PopupViewController\n\n`UIAlertController` drop in replacement with much more customization\n\nYou can literally replace `UIAlertController` by `PopupViewController` and `UIAlertAction` by `PopupAction` and you're done. Does not support Action Sheet for now, just alert mode.\n\nSimple example.\n\n``` Swift\n  let alert = PopupViewController(title: \"Alert title\", message: \"Alert message, which can be very long and etc....\")\n  alert.addAction(PopupAction(title: \"Ok\", type: .positive, handler: nil))\n  present(alert, animated: true, completion: nil)\n```\n\nResult:\n\n![Dark alert](https://raw.githubusercontent.com/Dimillian/PopupViewController/master/Images/classy.png)\n\nBy default it come with a dark theme, but where it become powerful is that you can customize it.\n\nExample:\n\n``` Swift\n  var customizable = PopupViewController.Customizable()\n  customizable.titleColor = UIColor.blue\n  customizable.positiveActionColor = UIColor.red\n  customizable.messageColor = UIColor.brown\n  customizable.messageFont = UIFont.boldSystemFont(ofSize: 22)\n  customizable.negativeActionColor = UIColor.brown\n  customizable.positiveActionColor = UIColor.blue\n  customizable.negativeActionBackgroundColor = UIColor.black\n  customizable.positiveActionBackgroundColor = UIColor.white\n  customizable.positiveActionHighlightColor = UIColor.green\n  customizable.negativeActionHighlightColor = UIColor.red\n\n  let alert = PopupViewController(title: \"Alert title\",\n                                        message: \"Alert message, which can be very long message and all that but nobody will ever read it.\",\n                                        customizable: customizable)\n  alert.blurStyle = .extraLight\n  alert.addAction(PopupAction(title: \"Ok\", type: .positive, handler: nil))\n  alert.addAction(PopupAction(title: \"Cancel\", type: .negative, handler: nil))\n  present(alert, animated: true, completion: nil)\n```\n\nResult:\n\n![Ugly alert](https://raw.githubusercontent.com/Dimillian/PopupViewController/master/Images/ugly.png)\n\nYes this is very ugly. But you know...\n\nYou can also set a static `Customizable`, it'll be re used if you pass no customizable in the `PopupViewController` constructor.\n\n``` Swift\n  var customizable = PopupViewController.Customizable()\n  customizable.titleColor = UIColor.blue\n  customizable.positiveActionColor = UIColor.red\n  customizable.messageColor = UIColor.brown\n  customizable.messageFont = UIFont.boldSystemFont(ofSize: 22)\n  customizable.negativeActionColor = UIColor.brown\n  customizable.positiveActionColor = UIColor.blue\n  customizable.negativeActionBackgroundColor = UIColor.black\n  customizable.positiveActionBackgroundColor = UIColor.white\n  customizable.positiveActionHighlightColor = UIColor.green\n  customizable.negativeActionHighlightColor = UIColor.red\n  PopupViewController.sharedCustomizable = alertCustomizable\n```\n## Todo\n* [ ] Action Sheet support\n* [ ] UITextFields Support\n* [ ] Custom view support\n* [ ] Shared Customizable configuration\n* [ ] Remove cartography dependency\n* [ ] Easier custom transition overwrite\n* [ ] Better default transition\n\n## Installation\n\n### Normal\n\nAdd `pod 'PopupViewController'` in your podfile and then run `pod install`\n\n### Dev mode\n\nClone this repository and and run `pod install` in both the PopupViewController and Example directory.\n\n### Note\n\nIt use the amazing [Cartography](https://github.com/robb/Cartography) as a dependency for now because I'm a lazy ass and I don't want to look at the Apple doc for the ugly Autolayout code hint.\n","funding_links":[],"categories":["UI"],"sub_categories":["Alert \u0026 Action Sheet","Other free courses"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdimillian%2FPopupViewController","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdimillian%2FPopupViewController","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdimillian%2FPopupViewController/lists"}