O'Reilly logo

iOS 8 SDK Development, 2nd Edition by Janie Clayton, Chris Adamson

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Transforming the Image View

Now that we see what affine transforms offer us, the properties and methods exposed by the gesture recognizers start to make more sense. The pinch gesture recognizer provides a scale that we could use to make a scale transform, and the pan recognizer offers translationInView that will be perfect for making a translation.

To make use of these transforms, we have a few options. UIView has a transform property, so we can set that directly. The underlying CALayer that provides the view’s appearance also has a transform property, although that one is of type CATransform3D and works in three dimensions. A more advanced option would be to write our own subclass of UIView or CALayer that draws its own contents; the Core ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required