Changes

Jump to: navigation, search
The Example Application
The goal will be to implement a constraint that aligns the centers of the Button and Label which are part of different view hierarchies - the button being part of the hierarchy contained by View A and the label being part of the View B sub-hierarchy.
In terms of visual layout, the user interface should appear as illustrated in Figure 18 2. Key points to note are that the label should have constraints associated with it which horizontally and vertically center it within View B and the button view should be positioned so that it is off center in the horizontal axis:
<google>ADSDAQBOX_FLOW</google>
[[Image:ios_7_autolayout_crossview_ui.png]]
Select the Main.storyboard file from the project navigator panel, select the view and change the background color to a light shade of grey using the Attributes Inspector. Drag and drop UIView, Button and label views onto the design canvas as illustrated in Figure 18-2, making sure to center the label object horizontally and vertically within the parent view.
Select the newly added view object, click on the Resolve Auto Layout Issues menu from the toolbar in the lower right hand corner of the canvas and select the Reset to Suggested Constraints option. Repeat these steps for both the label and button views.
== Establishing Outlets ==

Navigation menu