{"id":13503899,"url":"https://github.com/marmelroy/PeekPop","last_synced_at":"2025-03-29T19:30:41.419Z","repository":{"id":43027352,"uuid":"52338055","full_name":"marmelroy/PeekPop","owner":"marmelroy","description":"Peek and Pop with backwards-compatibility ","archived":false,"fork":false,"pushed_at":"2018-06-19T10:28:56.000Z","size":8034,"stargazers_count":1954,"open_issues_count":15,"forks_count":123,"subscribers_count":42,"default_branch":"master","last_synced_at":"2025-03-25T00:36:55.281Z","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/marmelroy.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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-23T06:57:38.000Z","updated_at":"2025-02-20T03:31:06.000Z","dependencies_parsed_at":"2022-09-10T00:01:35.123Z","dependency_job_id":null,"html_url":"https://github.com/marmelroy/PeekPop","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/marmelroy%2FPeekPop","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marmelroy%2FPeekPop/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marmelroy%2FPeekPop/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marmelroy%2FPeekPop/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/marmelroy","download_url":"https://codeload.github.com/marmelroy/PeekPop/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245966960,"owners_count":20701759,"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-07-31T23:00:49.329Z","updated_at":"2025-03-29T19:30:41.346Z","avatar_url":"https://github.com/marmelroy.png","language":"Swift","funding_links":[],"categories":["UI","Swift","Libs","Other"],"sub_categories":["Gesture","Mathematics","Other Testing"],"readme":"![PeekPop - backwards-compatible peek and pop in Swift](https://cloud.githubusercontent.com/assets/889949/13729164/1df56d7a-e92f-11e5-8190-4188f7e848aa.png)\n\n[![Build Status](https://travis-ci.org/marmelroy/PeekPop.svg?branch=master)](https://travis-ci.org/marmelroy/PeekPop) [![Version](http://img.shields.io/cocoapods/v/PeekPop.svg)](http://cocoapods.org/?q=PeekPop)\n[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)\n\n# PeekPop\nPeek and Pop is a great new iOS feature introduced with iPhone 6S and 6S+ that allows you to easily preview content using 3D touch.\n\nSadly, almost 60% of iOS users are on older devices. \n\nPeekPop is a Swift framework that brings backwards-compatibility to Peek and Pop.  \n\n\u003cp align=\"center\"\u003e\u003cimg src=\"https://cloud.githubusercontent.com/assets/1930855/19472280/3a1e7eac-9559-11e6-93e3-ecc35e60699f.gif\" width=\"242\" height=\"425\"/\u003e\u003c/p\u003e\n\n## Features\n\n\n              |  Features\n--------------------------|------------------------------------------------------------\n:star2: | Uses Apple's beautiful peek and pop interaction for devices with 3D touch.\n:point_up_2: | Custom Pressure-sensitive tap recognition for older devices.\n:heartpulse: | Faithful recreation of the peek and pop animation on older devices. \n:iphone: | Almost identical API to Apple's.\n:eight: | Runs on all iOS8+ devices.\n\nMissing features:\n- Support for peek and pop preview actions in devices that don't have 3D touch. \n\n## Usage\n\nImport PeekPop at the top of the Swift file.\n\n```swift\nimport PeekPop\n```\n\nCreate a PeekPop object, register your view controller for handling the peek and specify the source view. You will also need to declare that your view controller will conform to the PeekPopPreviewingDelegate protocol.\n\n```swift\nclass MyViewController: UIViewController, PeekPopPreviewingDelegate {\n    \n    var peekPop: PeekPop?\n        \n    override func viewDidLoad() {\n        peekPop = PeekPop(viewController: self)\n        peekPop?.registerForPreviewingWithDelegate(self, sourceView: collectionView)\n    }\n```\n\nPeekPopPreviewingDelegate requires implementing two simple functions. You will need to tell it what view controller to present for peeking purposes with: \n```swift\n    func previewingContext(_ previewingContext: PreviewingContext, viewControllerForLocation location: CGPoint) -\u003e UIViewController?\n```\n\n...and you will need to tell it how to commit the preview view controller at the end of the transition with: \n```swift\n    func previewingContext(_ previewingContext: PreviewingContext, commitViewController viewControllerToCommit: UIViewController)\n```\n\n## How does it work? \n\nIn devices without 3D touch, PeekPop recognizes pressure on the screen by monitoring significant changes in UITouch's majorRadius value. \n\nIt assumes that by pressing harder on your iPhone, more of the surface area of your finger is in contact with the screen. This is true in the majority of cases. \n\n### Setting up with [CocoaPods](http://cocoapods.org/?q=PeekPop)\n```ruby\nsource 'https://github.com/CocoaPods/Specs.git'\npod 'PeekPop', '~\u003e 1.0'\n```\n\n### Setting up with Carthage\n\n[Carthage](https://github.com/Carthage/Carthage) is a decentralized dependency manager that automates the process of adding frameworks to your Cocoa application.\n\nYou can install Carthage with [Homebrew](http://brew.sh/) using the following command:\n\n```bash\n$ brew update\n$ brew install carthage\n```\n\nTo integrate PeekPop into your Xcode project using Carthage, specify it in your `Cartfile`:\n\n```ogdl\ngithub \"marmelroy/PeekPop\"\n```\n\n## Inspiration\n- [http://krakendev.io/peek-pop/](http://krakendev.io/peek-pop/)\n- [http://flexmonkey.blogspot.fr/2015/10/the-plum-o-meter-weighing-plums-using.html](http://flexmonkey.blogspot.fr/2015/10/the-plum-o-meter-weighing-plums-using.html)\n- [https://github.com/b3ll/Pseudo3DTouch](https://github.com/b3ll/Pseudo3DTouch)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarmelroy%2FPeekPop","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarmelroy%2FPeekPop","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarmelroy%2FPeekPop/lists"}