New Framework Brings 3D Touch Peek And Pop To Unsupported iPhone And iPad Models
If you’re one of the lucky individuals who own one of Apple’s iPhone 6s or iPhone 6s Plus devices, then no doubt you’ve been enjoying all of the spoils that the hardware offers over older devices. A new pressure-sensitive display assembly on the iPhone 6s range introduced 3D Touch ability to perform specific actions based on how hard the display is pressed, but of course, that only applies to the latest two devices. Now, thanks to a framework repository called PeekPop on GitHub, developers are able to integrate the awesome 3D Touch functionality into older unsupported iPhones and even iPads.
For those that may not know, Apple’s 3D Touch Peek and Pop functionality was originally introduced as part of what the company called “the next-generation” of multitouch. Basically, it was brought in as a way of interacting with content as part of the 3D Touch functionality that formed a major part of the iPhone 6s release last year. First and third-party apps that have baked in Peek and Pop support provide users with the ability to “peek” at some content when pressing lightly on the display before actually applying additional hard pressure on the display to “pop” that content into the main view.
This type of functionality has generally been received well by those with an iPhone 6s, but as the developer of the PeekPop framework rightly points out, approximately 80% of iOS users are still running with an iPhone or iPad that doesn’t have native hardware support for 3D Touch. The PeekPop framework, which is written entirely in the Swift programming language, essentially brings backwards-compatibility to Apple’s Peek and Pop, allowing many more users with older-generation hardware to benefit from the feature. The framework uses Apple’s own Peek and Pop interaction for devices that support 3D Touch, but faithfully recreates the experience on older devices running iOS 8 or above.
That recreation involves creating an API that is almost identical to Apple’s own, and going through the painful process of recreating Apple’s Peek and Pop animations with alarming accuracy. It’s worth noting that this framework doesn’t have the capabilities of altering any hardware aspect of the device, but rather gives developers a way of adding 3D Touch-like features to apps by detecting a touch on the display and doing some intelligent work behind-the-scenes to determine the how forceful that touch is over a standard touch interaction.
The experience may not be exactly same as the hardware-supported 3D Touch, but is still pretty close to the real thing.
If you’re a developer, or interested in the framework, you can view the repository directly from the source at GitHub.