{"id":13466988,"url":"https://github.com/k-lpmg/PanSlip","last_synced_at":"2025-03-26T00:31:48.068Z","repository":{"id":62450441,"uuid":"191414428","full_name":"k-lpmg/PanSlip","owner":"k-lpmg","description":"Use PanGesture to dismiss view on UIViewController and UIView","archived":false,"fork":false,"pushed_at":"2022-08-03T05:25:55.000Z","size":39,"stargazers_count":105,"open_issues_count":1,"forks_count":10,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-24T13:44:19.597Z","etag":null,"topics":["dismiss","dismissible","pangesture","uiview","uiviewcontroller"],"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/k-lpmg.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":"2019-06-11T16:57:58.000Z","updated_at":"2025-02-19T11:53:09.000Z","dependencies_parsed_at":"2022-11-01T23:33:04.844Z","dependency_job_id":null,"html_url":"https://github.com/k-lpmg/PanSlip","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/k-lpmg%2FPanSlip","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/k-lpmg%2FPanSlip/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/k-lpmg%2FPanSlip/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/k-lpmg%2FPanSlip/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/k-lpmg","download_url":"https://codeload.github.com/k-lpmg/PanSlip/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245566099,"owners_count":20636391,"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":["dismiss","dismissible","pangesture","uiview","uiviewcontroller"],"created_at":"2024-07-31T15:00:52.025Z","updated_at":"2025-03-26T00:31:44.495Z","avatar_url":"https://github.com/k-lpmg.png","language":"Swift","funding_links":[],"categories":["Libs","UI [🔝](#readme)"],"sub_categories":["UI"],"readme":"# PanSlip\n[![Build Status](https://travis-ci.org/k-lpmg/PanSlip.svg?branch=master)](https://travis-ci.org/k-lpmg/PanSlip)\n![Swift](https://img.shields.io/badge/Swift-5.0-orange.svg)\n[![Cocoapods](https://img.shields.io/cocoapods/v/PanSlip.svg?style=flat)](https://cocoapods.org/pods/PanSlip)\n[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)\n![Platform](https://img.shields.io/badge/Platform-iOS-lightgrey.svg)\n[![License](https://img.shields.io/badge/license-MIT-green.svg)](https://github.com/k-lpmg/PanSlip/blob/master/LICENSE)\n\nUse PanGesture to dismiss view on UIViewController and UIView.\n\n## Introduction\n\n### PanSlip to UIViewController\nleft to right | right to left | top to bottom | bottom to top\n--- | :---: | --- | :---:\n\u003cimg src=\"https://user-images.githubusercontent.com/15151687/59292203-8df41c00-8cb7-11e9-82ba-2a8dd3116c24.gif\" width=\"155\" height=\"330\"\u003e | \u003cimg src=\"https://user-images.githubusercontent.com/15151687/59292205-8fbddf80-8cb7-11e9-8f5d-27580041a429.gif\" width=\"155\" height=\"330\"\u003e | \u003cimg src=\"https://user-images.githubusercontent.com/15151687/59292211-9187a300-8cb7-11e9-83e2-2f51b519cbb5.gif\" width=\"155\" height=\"330\"\u003e | \u003cimg src=\"https://user-images.githubusercontent.com/15151687/59292214-93e9fd00-8cb7-11e9-9378-2cbe460de4d7.gif\" width=\"155\" height=\"330\"\u003e\n\n### PanSlip to UIView\nleft to right | right to left | top to bottom | bottom to top\n--- | :---: | --- | :---:\n\u003cimg src=\"https://user-images.githubusercontent.com/15151687/59292218-977d8400-8cb7-11e9-807f-5d5d096be483.gif\" width=\"155\" height=\"330\"\u003e | \u003cimg src=\"https://user-images.githubusercontent.com/15151687/59292220-9a787480-8cb7-11e9-9bd4-27a18d555b60.gif\" width=\"155\" height=\"330\"\u003e | \u003cimg src=\"https://user-images.githubusercontent.com/15151687/59292224-9cdace80-8cb7-11e9-8bc1-8401d9b794eb.gif\" width=\"155\" height=\"330\"\u003e | \u003cimg src=\"https://user-images.githubusercontent.com/15151687/59292228-a06e5580-8cb7-11e9-9b4e-8262ac573ac0.gif\" width=\"155\" height=\"330\"\u003e\n\n## Usage\n\n#### Enable\n```swift\n// UIViewController\nlet viewController = UIViewController()\nviewController.ps.enable(slipDirection: .topToBottom) {\n    // TODO completion when UIViewController dismissed\n}\n\n// UIView\nlet view = UIView()\nview.ps.enable(slipDirection: .topToBottom) {\n    // TODO completion when UIView dismissed\n}\n```\n\n#### Disable\n```swift\n// UIViewController\nlet viewController = UIViewController()\nviewController.ps.disable()\n\n// UIView\nlet view = UIView()\nview.ps.disable()\n```\n\n#### Manual slip\n```swift\n// UIViewController\nlet viewController = UIViewController()\nviewController.ps.slip(animated: true)\n\n// UIView\nlet view = UIView()\nview.ps.slip(animated: true)\n```\n\n#### Set percentThreshold\n```swift\n// UIViewController\nextension UIViewController: PanSlipBehavior {\n    public var percentThreshold: CGFloat? {\n        return 0.2\n    }\n}\n\n// UIView\nextension UIView: PanSlipBehavior {\n    public var percentThreshold: CGFloat? {\n        return 0.2\n    }\n}\n```\n\n## Installation\n\n#### CocoaPods (iOS 8+)\n\n```ruby\nplatform :ios, '8.0'\nuse_frameworks!\n\ntarget '\u003cYour Target Name\u003e' do\n    pod 'PanSlip'\nend\n```\n\n#### Carthage (iOS 8+)\n\n```ruby\ngithub \"k-lpmg/PanSlip\"\n```\n\n## LICENSE\n\nThese works are available under the MIT license. See the [LICENSE][license] file\nfor more info.\n\n[license]: LICENSE\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fk-lpmg%2FPanSlip","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fk-lpmg%2FPanSlip","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fk-lpmg%2FPanSlip/lists"}