Changes

Jump to: navigation, search

Implementing iOS 8 Auto Layout Constraints in Swift Code

43 bytes added, 20:00, 27 October 2016
m
Text replacement - "<table border="0" cellspacing="0">" to "<table border="0" cellspacing="0" width="100%">"
<googlehtmlet>BUY_IOS8ios9_upgrade</googlehtmlet>
In the case of a constraint that references a single view, the constraint must be added to the immediate parent of the view. When a constraint references two views, the constraint must be applied to the closest ancestor of the two views. Consider, for the purposes of an example, the view hierarchy illustrated in Figure 21-1.
<htmlet>adsdaqbox_flow</htmlet>
[[Image:ios_7_autolayout_view_hierarchy.png|The view hierarchy for an iOS 8 Auto Layout code example]]
self.view.addSubview(mybutton)
</pre>
<googlehtmlet>BUY_IOS8ios9_upgrade</googlehtmlet>
== An Example Application ==
<googlehtmlet>BUY_IOS8ios9_upgrade</googlehtmlet>

Navigation menu