O'Reilly logo

Learning iOS Development: A Hands-on Guide to the Fundamentals of iOS Programming by Erica Sadun, Rod Strougo, Maurice Sharp

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

Adding the Taxi View with Drag

Follow these steps to enable dragging the car view:

1. Open AboutViewController.xib in IB.

2. Add an image view above the text and set image to placeholder and the background color to lemon.

3. While you are in the XIB, fix the centering of the existing text so it works on the iPad. Select the label and set the constraints to horizontally and vertically centered in the container.

Now set the taxi view constraints to the following: The bottom is the system distance from the top of the label, the width and height are fixed at 40, and it is horizontally centered in the superview.

4. Select the image view and check User Interaction Enabled in the Attributes inspector. This flag enables the image view to receive gestures. ...

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