JustPeek is an iOS Library that adds support for Force Touch-like Peek and Pop interactions on devices that do not natively support this kind of interaction.

Overview

JustPeek Banner

JustPeek

Version License Platform

Warning: This library is not supported anymore by Just Eat.

JustPeek is an iOS Library that adds support for Force Touch-like Peek and Pop interactions on devices that do not natively support this kind of interaction. Under the hood it uses the native implementation if available, otherwise a custom implementation based on UILongPressGestureRecognizer.

JustPeek Demo

Usage

Swift 3.2 = Version 0.3.1

Swift 4 = Version 1.0.0

// In a UITableViewController

import JustPeek

...

var peekController: PeekController?

// MARK: View Lifecycle

override func viewDidLoad() {
    super.viewDidLoad()
    peekController = PeekController()
    peekController?.register(viewController: self, forPeekingWithDelegate: self, sourceView: tableView)
}

// MARK: PeekingDelegate

func peekContext(_ context: PeekContext, viewControllerForPeekingAt location: CGPoint) -> UIViewController? {
    let viewController = storyboard?.instantiateViewController(withIdentifier: "ViewController")
    if let viewController = viewController, let indexPath = tableView.indexPathForRow(at: location) {
        configureViewController(viewController, withItemAtIndexPath: indexPath)
        if let cell = tableView.cellForRow(at: indexPath) {
            context.sourceRect = cell.frame
        }
        return viewController
    }
    return nil
}

func peekContext(_ context: PeekContext, commit viewController: UIViewController) {
    show(viewController, sender: self)
}

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Installation

JustPeek is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod "JustPeek"

License

JustPeek is available under the Apache License, Version 2.0. See the LICENSE file for more info.

You might also like...
Create an easy to peek SwiftUI View to showcase your own data, catalog, images, or anything you'd like.
Create an easy to peek SwiftUI View to showcase your own data, catalog, images, or anything you'd like.

Create an easy to peek SwiftUI View to showcase your own data, catalog, images, or anything you'd like.

Overrides macOS external display EDIDs to force RGB color

edidiotic edidiotic creates EDID overrides for external displays on macOS that set the display type to RGB color and removes all extension blocks. Thi

An iOS library to natively render After Effects vector animations
An iOS library to natively render After Effects vector animations

Lottie for iOS, macOS (and Android and React Native) View documentation, FAQ, help, examples, and more at airbnb.io/lottie Lottie is a mobile library

🔥 🔥 🔥Support for ORM operation,Customize the PQL syntax for quick queries,Support dynamic query,Secure thread protection mechanism,Support native operation,Support for XML configuration operations,Support compression, backup, porting MySQL, SQL Server operation,Support transaction operations.

🔥 🔥 🔥Support for ORM operation,Customize the PQL syntax for quick queries,Support dynamic query,Secure thread protection mechanism,Support native operation,Support for XML configuration operations,Support compression, backup, porting MySQL, SQL Server operation,Support transaction operations.

A replacement for as which runs in constant time instead of O(n) when the conformance is not satisfiedA replacement for as which runs in constant time instead of O(n) when the conformance is not satisfied

ZConform A replacement for as? which runs in constant time instead of O(n) when the conformance is not satisfied. How it works ZConform does a one-tim

The Waterwheel Swift SDK provides classes to natively connect iOS, macOS, tvOS, and watchOS applications to Drupal 7 and 8.
The Waterwheel Swift SDK provides classes to natively connect iOS, macOS, tvOS, and watchOS applications to Drupal 7 and 8.

Waterwheel Swift SDK for Drupal Waterwheel makes using Drupal as a backend with iOS, macOS, tvOS, or watchOS enjoyable by combining the most used feat

Realtime Dynamic localization translation delivery system for iOS and Mac OSX in Swift. Create and update texts from localization.com without needing to recompile or redeploy. Cocapod for iOS devices (iPad, iPhone, iPod Touch and Mac)
Swipe to "like" or "dislike" any view, just like Tinder.app. Build a flashcard app, a photo viewer, and more, in minutes, not hours!

MDCSwipeToChoose Swipe to "like" or "dislike" any view, just like Tinder.app. Build a flashcard app, a photo viewer, and more, in minutes, not hours!

An extensible iOS and OS X animation library, useful for physics-based interactions.
An extensible iOS and OS X animation library, useful for physics-based interactions.

Pop is an extensible animation engine for iOS, tvOS, and OS X. In addition to basic static animations, it supports spring and decay dynamic animations

A library of custom iOS View Controller Animations and Interactions.
A library of custom iOS View Controller Animations and Interactions.

RZTransitions is a library to help make iOS7 custom View Controller transitions slick and simple. Installation CocoaPods (Recommended) Add the followi

AirMessage Server, implemented natively in Swift
AirMessage Server, implemented natively in Swift

AirMessage Server AirMessage lets people use iMessage on the devices they like. AirMessage Server functions as the bridge between AirMessage client ap

Rendering Markdown text natively in SwiftUI.
Rendering Markdown text natively in SwiftUI.

MarkdownView MarkdownView is a Swift Package for rendering Markdown text natively in SwiftUI. Thanks to apple/swift-markdown, it can fully compliant w

Elegant library to manage the interactions between view and model in Swift
Elegant library to manage the interactions between view and model in Swift

An assistant to manage the interactions between view and model ModelAssistant is a mediator between the view and model. This framework is tailored to

SAHistoryNavigationViewController realizes iOS task manager like UI in UINavigationContoller. Support 3D Touch!
SAHistoryNavigationViewController realizes iOS task manager like UI in UINavigationContoller. Support 3D Touch!

SAHistoryNavigationViewController Support 3D Touch for iOS9!! SAHistoryNavigationViewController realizes iOS task manager like UI in UINavigationConto

SAHistoryNavigationViewController realizes iOS task manager like UI in UINavigationContoller. Support 3D Touch!
SAHistoryNavigationViewController realizes iOS task manager like UI in UINavigationContoller. Support 3D Touch!

SAHistoryNavigationViewController realizes iOS task manager like UI in UINavigationContoller. Support 3D Touch!

SwiftUI, peek scrolling animation and card tapped animation, using GeometryReader
SwiftUI, peek scrolling animation and card tapped animation, using GeometryReader

SwiftUI, peek scrolling animation and card tapped animation, using GeometryReader, follow the livestream tutorial by MengTo.

An iBeacon Manager library was created to simplify your interactions with iBeacons.
An iBeacon Manager library was created to simplify your interactions with iBeacons.

JMCiBeaconManager iBeacon is a name of technology that is enabling new location awareness possibilities for apps. "Leveraging Bluetooth Low Energy (BL

AREK is a clean and easy way to request any kind of iOS permission (with some nifty features 🤖)
AREK is a clean and easy way to request any kind of iOS permission (with some nifty features 🤖)

AREK is a clean and easy to use wrapper over any kind of iOS permission written in Swift. Why AREK could help you building a better app is well descri

Apple's Framework to support in-app purchases and interaction with the App Store

Apple's Framework to support in-app purchases and interaction with the App Store.

Comments
Releases(0.3.1)
  • 0.3.1(Dec 13, 2016)

  • 0.3.0(Nov 2, 2016)

  • 0.2.0(Oct 24, 2016)

    Adds UI Tests and support for committing previewing UIViewController on non-force-touch devices.

    Features

    • Allows, on older devices only, to keep the preview on screen by moving the finger away from initial press location, and to dismiss the preview - in this case - by tapping anywhere on the screen.
    • Allows to commit previewing UIViewControllers on non-force-touch devices.

    Known issues

    • The fallback implementation needs tweaks in the animation.
    • The fallback implementation doesn't allow support moving from Peek state to Commit.
    Source code(tar.gz)
    Source code(zip)
  • 0.1.0(Sep 29, 2016)

    Initial release.

    Features

    • Wraps iOS SDK protocols to support Peek / Pop functionality and enables it on non-force-touch devices.

    Known issues

    • The fallback implementation needs tweaks in the animation.
    • The fallback implementation doesn't allow support moving from Peek state to Commit.
    Source code(tar.gz)
    Source code(zip)
Swift wrapper for iOS Home Screen Quick Actions (App Icon Shortcuts)

QuickActions Swift wrapper for iOS Home Screen Quick Actions This wrapper creates dynamic quick actions. It is possible to define static quick actions

Ricardo Pereira 251 Dec 29, 2022
PeekView supports peek, pop and preview actions for iOS devices without 3D Touch capibility

PeekView When implementing peek, pop and preview actions with 3D Touch, you may want to support such features for users accessing your app from older

Huong Do 123 Mar 25, 2022
Peek and Pop with backwards-compatibility

PeekPop Peek and Pop is a great new iOS feature introduced with iPhone 6S and 6S+ that allows you to easily preview content using 3D touch. Sadly, alm

Roy Marmelstein 2k Dec 8, 2022
ExpandingCollection is an animated material design UI card peek/pop controller.

EXPANDING COLLECTION An animated material design UI card peek/pop controller We specialize in the designing and coding of custom UI for Mobile Apps an

Ramotion 5.5k Jan 6, 2023
RadialMenu is a custom control for providing a touch context menu (like iMessage recording in iOS 8) built with Swift & POP

RadialMenu Looking for help? For $150/hr I'll help with your RadialMenu problems including integrating it into your project. Email [email protected] t

Brad Jasper 297 Nov 27, 2022
RadialMenu is a custom control for providing a touch context menu (like iMessage recording in iOS 8) built with Swift & POP

RadialMenu Looking for help? For $150/hr I'll help with your RadialMenu problems including integrating it into your project. Email [email protected] t

Brad Jasper 297 Nov 27, 2022
Hammer is a touch, stylus and keyboard synthesis library for emulating user interaction events

Hammer is a touch, stylus and keyboard synthesis library for emulating user interaction events. It enables better ways of triggering UI actions in unit tests, replicating a real world environment as much as possible.

Lyft 626 Dec 23, 2022
Powerful autolayout framework, that can manage UIView(NSView), CALayer and not rendered views. Not Apple Autolayout wrapper. Provides placeholders. Linux support.

CGLayout Powerful autolayout framework, that can manage UIView(NSView), CALayer and not rendered views. Has cross-hierarchy coordinate space. Implemen

Koryttsev Denis 45 Jun 28, 2022
CachyKit - A Caching Library is written in Swift that can cache JSON, Image, Zip or AnyObject with expiry date/TTYL and force refresh.

Nice threadsafe expirable cache management that can cache any object. Supports fetching from server, single object expire date, UIImageView loading etc.

Sadman Samee 122 Dec 28, 2022
RxBluetoothKit is a Bluetooth library that makes interaction with BLE devices much more pleasant.

RxBluetoothKit is a Bluetooth library that makes interaction with BLE devices much more pleasant. It's backed by RxSwift and CoreBluetooth and it prov

Polidea 1.3k Jan 6, 2023