Handling rotation gestures | Apple Developer Documentation

Measure the relative rotation of two fingers on the screen, and use that motion to rotate your content.