O'Reilly logo

Application Development in iOS 7 by Kyle Begeman

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

Applying constraints

Our menu view features two buttons to navigate to separate areas of the application. We want the buttons to always be in alignment with one another, so let's add some constraints to our buttons to make that happen.

One way to add a constraint between two objects is the control drag from one object to the other. Hold down the control key on your keyboard and then click-and-drag from the Add New button to the My Foods button. A new pop up will show these multiple options to add constraints. Each of these items can be selected and will provide the respective constraints between the two objects. Holding down the shift key will allow you to select more than one option at a time.

From the menu, select Horizontal Spacing. You will ...

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