{"id":21065045,"url":"https://github.com/prolificinteractive/velar","last_synced_at":"2026-03-06T19:02:01.803Z","repository":{"id":62457236,"uuid":"131296341","full_name":"prolificinteractive/Velar","owner":"prolificinteractive","description":"A custom alert view presenter.","archived":false,"fork":false,"pushed_at":"2018-07-31T20:51:32.000Z","size":5253,"stargazers_count":6,"open_issues_count":3,"forks_count":2,"subscribers_count":13,"default_branch":"master","last_synced_at":"2025-04-29T13:05:11.495Z","etag":null,"topics":["alert","card","custom","presenter"],"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/prolificinteractive.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":"2018-04-27T12:54:08.000Z","updated_at":"2020-04-16T08:08:49.000Z","dependencies_parsed_at":"2022-11-02T00:15:32.902Z","dependency_job_id":null,"html_url":"https://github.com/prolificinteractive/Velar","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prolificinteractive%2FVelar","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prolificinteractive%2FVelar/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prolificinteractive%2FVelar/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prolificinteractive%2FVelar/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/prolificinteractive","download_url":"https://codeload.github.com/prolificinteractive/Velar/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254456229,"owners_count":22074131,"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":["alert","card","custom","presenter"],"created_at":"2024-11-19T17:53:17.173Z","updated_at":"2026-03-06T19:01:56.731Z","avatar_url":"https://github.com/prolificinteractive.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Velar](Images/bg_velar.png)\n\n[![Travis build status](https://img.shields.io/travis/prolificinteractive/Velar.svg?style=flat-square)](https://travis-ci.org/prolificinteractive/Velar)\n[![Cocoapods Compatible](https://img.shields.io/cocoapods/v/Velar.svg?style=flat-square)](https://img.shields.io/cocoapods/v/Velar.svg)\n[![Platform](https://img.shields.io/cocoapods/p/Velar.svg?style=flat-square)](http://cocoadocs.org/docsets/Velar)\n[![Docs](https://img.shields.io/cocoapods/metrics/doc-percent/Velar.svg?style=flat-square)](http://cocoadocs.org/docsets/Velar)\n\n## Description\n\nVelar can present a custom view with a swipeable dismiss gesture.\n\n![Velar.gif](Images/Velar.gif)\n\n## Requirements\n\n* iOS 8.0+\n\n## Installation\n\n### CocoaPods\nVelar is available through [CocoaPods](http://cocoapods.org). To install\nit, simply add the following line to your Podfile:\n\n```ruby\npod 'Velar'\n```\n## Usage\n\n### Create the Designer \n\n```\nfinal class DefaultBackgroundOverlayDesigner: BackgroundOverlayDesignable {\n\n    var dismissLabelText: String {\n        return \"Release to Dismiss!\"\n    }\n\n    var hideDismissLabel: Bool {\n        return false\n    }\n\n    var dismissLabelColor: UIColor {\n        return UIColor.white\n    }\n\n    var backgroundColor: UIColor {\n        return UIColor.black.withAlphaComponent(0.4)\n    }\n}\n```\n\n### Build the Modal View Presenter\n\n```\nprivate lazy var velarPresenter: VelarPresenter = {\n    return VelarPresenterBuilder.build(designer: DefaultBackgroundOverlayDesigner())\n}()\n```\n\n### Show the Alert \n\n```\nvelarPresenter.show(view: imagePopOverView, animate: true)\n```\n\n### Hide the Alert\n\n```\nvelarPresenter.hide(animate: true)\n```\n\n### Presenter Delegate\n\nThe `VelarPresenter` has a delegate that can be used to know when the presenter is going to present or dismiss. \n\n```\npublic protocol VelarPresenterDelegate {\n\n    /// Notifies delegate that velar presenter will present.\n    func willPresent()\n\n    /// Notifies delegate that velar presenter will dismiss.\n    func willDismiss()\n\n    /// Notifies delegate that velar presenter did present.\n    func didPresent()\n\n    /// Notifies delegate that velar presenter did dismiss.\n    func didDismiss()\n\n}\n```\nSimply set the delegate of the `VelarPresenter` to handle these updates.\n\n`velarPresenter.delegate = self`\n\n## Contributing to Velar\n\nTo report a bug or enhancement request, feel free to file an issue under the respective heading.\n\nIf you wish to contribute to the project, fork this repo and submit a pull request. Code contributions should follow the standards specified in the [Prolific Swift Style Guide](https://github.com/prolificinteractive/swift-style-guide).\n\n## License\n\n![prolific](https://s3.amazonaws.com/prolificsitestaging/logos/Prolific_Logo_Full_Color.png)\n\nCopyright (c) 2017 Prolific Interactive\n\nVelar is maintained and sponsored by Prolific Interactive. It may be redistributed under the terms specified in the [LICENSE] file.\n\n[LICENSE]: ./LICENSE\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprolificinteractive%2Fvelar","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprolificinteractive%2Fvelar","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprolificinteractive%2Fvelar/lists"}