{"id":2686,"url":"https://github.com/daisuke310vvv/PopupController","last_synced_at":"2025-08-03T00:32:21.177Z","repository":{"id":44830337,"uuid":"51082195","full_name":"daisuke310vvv/PopupController","owner":"daisuke310vvv","description":"PopupController is a controller for showing temporary popup view.","archived":false,"fork":false,"pushed_at":"2020-08-06T14:28:06.000Z","size":1542,"stargazers_count":337,"open_issues_count":25,"forks_count":61,"subscribers_count":16,"default_branch":"master","last_synced_at":"2024-11-14T16:15:14.544Z","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/daisuke310vvv.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-04T14:46:35.000Z","updated_at":"2024-01-18T10:48:55.000Z","dependencies_parsed_at":"2022-07-14T19:17:04.448Z","dependency_job_id":null,"html_url":"https://github.com/daisuke310vvv/PopupController","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daisuke310vvv%2FPopupController","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daisuke310vvv%2FPopupController/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daisuke310vvv%2FPopupController/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daisuke310vvv%2FPopupController/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/daisuke310vvv","download_url":"https://codeload.github.com/daisuke310vvv/PopupController/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228510773,"owners_count":17931761,"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:20.153Z","updated_at":"2024-12-06T18:30:41.411Z","avatar_url":"https://github.com/daisuke310vvv.png","language":"Swift","funding_links":[],"categories":["UI"],"sub_categories":["Popup","Layout","Other free courses"],"readme":"# PopupController\n[![CI Status](http://img.shields.io/travis/daisuke310vvv/PopupController.svg?style=flat)](https://travis-ci.org/daisuke310vvv/PopupController)\n[![Version](https://img.shields.io/cocoapods/v/PopupController.svg?style=flat)](http://cocoapods.org/pods/PopupController)\n[![License](https://img.shields.io/cocoapods/l/PopupController.svg?style=flat)](http://cocoapods.org/pods/PopupController)\n[![Platform](https://img.shields.io/cocoapods/p/PopupController.svg?style=flat)](http://cocoapods.org/pods/PopupController)  \n  \n*PopupController* is a controller for showing temporary popup view.  \n  \n\u003cp align=\"center\"\u003e\n\u003cimg src=\"https://github.com/daisuke310vvv/PopupController/blob/master/screenshots/ss01.jpg\" width=\"250px\" /\u003e\n\u003cimg src=\"https://github.com/daisuke310vvv/PopupController/blob/master/screenshots/ss02.jpg\" width=\"250px\" /\u003e\n\u003cimg src=\"https://github.com/daisuke310vvv/PopupController/blob/master/screenshots/ss03.jpg\" width=\"250px\" /\u003e\n\u003c/p\u003e\n  \n## Demo\nTry *PopupController* on [Appetize.io](https://appetize.io/app/k498jv54rud8erd7dgnv83kgmr?device=iphone5s\u0026scale=75\u0026orientation=portrait\u0026osVersion=9.2)  \n  \n\u003cimg src=\"https://github.com/daisuke310vvv/PopupController/blob/master/screenshots/ss.gif\" width=\"250px\" /\u003e\n\n## Installation\n### CocoaPods\n\n```\npod 'PopupController'\n```\n\n### Carthage\nFuture\n\n## Usage\n\nBefore use,  \nEvery ViewController which is added on the PopupController must conform to *PopupContentViewController* protocol.  \n\n```swift\nclass AnyPopupViewController: UIViewController, PopupContentViewController {\n\n\t// Do something...\n\n\tprivate var popupSize: CGSize // define the size for showing popup view size.\n\n\t// PopupContentViewController Protocol\n    func sizeForPopup(popupController: PopupController, size: CGSize, showingKeyboard: Bool) -\u003e CGSize {\n\t    return popupSize\n\t}\n}\n```\n  \nThen, show popup  \n\n```swift\nPopupController\n    .create(self)\n    .show(AnyPopupViewController())\n```  \n  \nWith some custom.  \n  \n```swift\nPopupController\n    .create(self)\n    .customize(\n        [\n            .Animation(.FadeIn), \n            .Layout(.Top), \n            .BackgroundStyle(.BlackFilter(alpha: 0.7))\n        ]\n    )\n    .show(AnyPopupViewController())\n```  \n\nWith Handler  \n\n```swift\nPopupController\n    .create(self)\n    .customize(\n        [\n            .Scrollable(false), \n            .DismissWhenTaps(true)\n        ]\n    )\n    .didShowHandler { popup in\n        // Do something\n    }\n    .didCloseHandler { _ in\n        // Do something\n    }\n    .show(AnyPopupViewController())\n```  \n\nIf you use PopupController instance, do like this below  \n\n```swift\nlet popup = PopupController\n    .create(self)\n    .customize(\n        [\n            .Animation(.SlideUp)\n        ]\n    )\n    .didShowHandler { popup in\n        // Do something\n    }\n    .didCloseHandler { _ in\n       // Do something\n    }\n\npopup.show() // show popup\npopup.dismiss() // dismiss popup\n```  \n  \n## Customization  \n  \n```swift\npublic enum PopupCustomOption {\n    case Layout(PopupController.PopupLayout)\n    case Animation(PopupController.PopupAnimation)\n    case BackgroundStyle(PopupController.PopupBackgroundStyle)\n    case Scrollable(Bool)\n    case DismissWhenTaps(Bool)\n    case MovesAlongWithKeyboard(Bool)\n}\n```\n\n## License\nPopupController 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%2Fdaisuke310vvv%2FPopupController","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdaisuke310vvv%2FPopupController","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaisuke310vvv%2FPopupController/lists"}