Skip to content
LNPreviewToContextMenu is a framework for automatically transforming your existing 3D Touch Peek&Pop preview controllers and actions into the new UIContextMenu system in iOS 13.
Objective-C
Branch: master
Clone or download
Latest commit f95ad0b Sep 25, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
LNPreviewContextCompatExample Add support for unregistering for preview Sep 20, 2019
LNPreviewToContextMenu Add shared scheme to git Sep 25, 2019
.gitignore
LICENSE Initial commit Sep 20, 2019
LNPreviewToContextMenu.png Initial commit Sep 20, 2019
README.md Update README.md Sep 23, 2019

README.md

LNPreviewToContextMenu

LNPreviewToContextMenu is a framework for automatically transforming your existing 3D Touch Peek&Pop preview controllers and actions into the new UIContextMenu system in iOS 13.

GitHub release GitHub stars GitHub license PayPal Donation Button

GitHub issues GitHub contributors Carthage compatible

With this framework, your existing 3D Touch Peek&Pop previewing code will automagically display in the new UIContextMenu system under iOS 13 and above.

Features

  • Supports storyboard and code-based previewing
  • Optionally, supports adding images to your existing preview action items to display as menu item images
  • Adds support for devices without 3D Touch (including iPhone 11 and iPads)
  • macOS Catalyst support (your preview actions are displayed as a context menus)

Adding to Your Project

Carthage

Add the following to your Cartfile:

github "LeoNatan/LNPreviewToContextMenu"

Make sure you follow the Carthage integration instructions here.

Manual

Drag the LNPreviewToContextMenu.xcodeproj project to your project, and add LNPreviewToContextMenu.framework to Frameworks, Libraries, and Embedded Content in your project target's General tab. Xcode should sort everything else on its own.

Check out the included example project to see how it is integrated with the framework.

CocoaPods

CocoaPods is not supported. There are many reasons for this. Instead of CocoaPods, use Carthage. You can continue using CocoaPods for for your other dependencies and Carthage for LNPreviewToContextMenu.

Using the Framework

Just link your project with the framework, and the magic will happen automatically.

Optionally, import <LNPreviewToContextMenu/UIPreviewAction+Images.h> to add support for images to your preview action items.

You can’t perform that action at this time.