Join Tammy Coron for an in-depth discussion in this video Peek and pop for web views, part of iOS 9 3D Touch Quick Start.
- [Voiceover] You can also provide Peek & Pop functionality…in web views, and it's surprisingly simple.…All you need to do is set the value of…the allowsLinkPreview property in a UIWebView.…This determines if previewing link destinations is allowed.…Let's head over to Xcode to see how this works.…For this demo, we'll be using the 3D Touch example project…included with the exercise files for this chapter.…You can see in our ViewController.swift,…on line 21, we've got the allowsLinkPreview value…to equal true.…
Let's build and run and see…what this looks like in the simulator.…Let's scroll down to a link,…and now if we lightly touch,…we'll be able to see a preview for that,…and then if we press a little harder,…it will actually take us to that content.…
In this course, Tammy Coron walks through the 3D Touch API. She shows how to add static and dynamic quick actions, which allow you to display shortcuts for app-specific tasks. She also covers peek—for displaying live previews of items—and pop, which opens a detailed version of the peek view. Last but not least, she shows how to implement custom actions using UITouch's new properties: force and maximumPossibleForce.
- Accessibility and 3D Touch
- Checking for 3D Touch availability
- Understanding static vs. dynamic actions
- Working with peek and pop views
- Working with UITouch objects