Changes

Jump to: navigation, search
m
Text replacement - "<table border="0" cellspacing="0">" to "<table border="0" cellspacing="0" width="100%">"
<googlehtmlet>BUY_IOS7ios9_upgrade</googlehtmlet>
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:
<googlehtmlet>ADSDAQBOX_FLOWadsdaqbox_flow</googlehtmlet>
[[Image:ios_7_autolayout_crossview_ui.png]]
As currently constrained, the label object is centered horizontally and vertically within the view we are referring to as View B. In place of this constraint, we need the label to be aligned with the center of the button object. This will involve removing the CenterX constraint and replacing it with a new constraint referencing the button. This requires outlets for both the View B instance and the CenterX constraint.
<googlehtmlet>BUY_IOS7ios9_upgrade</googlehtmlet>
Ctrl-click on the View B parent of the label object and drag the resulting line to the area immediately beneath the @interface directive in the Assistant Editor. Release the line and configure an outlet named viewB.
<googlehtmlet>BUY_IOS7ios9_upgrade</googlehtmlet>
 
<htmlet>ezoicbottom</htmlet>
<hr>
<table border="0" cellspacing="0" width="100%">

Navigation menu