Since the launch of iPhone 6s and 6s plus, Apple has introduced a new way of user interaction with mobile apps. A new dimension of touch event has been added by introducing 3D touch. By detecting how hard or deeply the user presses on the screen, you can do a specific action in your app. In the example below, we will see how to get the force of touch and log display on screen.
UILabeland place it at the center of the screen.
ViewController.swiftand override the following method:
override func touchesMoved(touches: Set<UITouch>, withEvent event: ...