Changes

Working with the iOS 9 Stack View Class

533 bytes added, 20:53, 16 December 2015
no edit summary
 
With hindsight it seems hard to believe, but until the introduction of iOS 9 there was no easy way to build stack based user interface layouts that would adapt automatically to different screen sizes and changes in device orientation. While such results could eventually be achieved with careful use of size classes and Auto Layout this was far from a simple task. That has now changed with the introduction of the UIStackView class in the iOS 9 SDK.
[[Image:xcode_7_stack_button.png]]
Figure 31-1
[[Image:ios9_stack_views_nested.png]]
Figure 31-2
[[Image:ios_9_stack_view_subviews.png]]
Figure 31-3
[[Image:ios_9_stack_view_arrangedsubviews.png]]
Figure 31-4
[[Image:ios9_stack_view_fill.png]]
Figure 31-5
[[Image:ios9_stack_view_fill_equal.png]]
Figure 31-6
[[Image:ios9_stack_view_equalspacing.png]]
Figure 31-7
[[Image:ios9_stack_view_equalcentering.png]]
Figure 31-8
[[Image:ios9_stack_view_alignment_fill.png]]
Figure 31-9
[[Image:ios9_stack_view_alignment_leading.png]]
Figure 31-10
[[Image:ios9_stack_view_alignment_trailing.png]]
Figure 31-11
[[Image:ios9_stack_view_alignment_top.png]]
Figure 31-12
[[Image:ios9_stack_view_alignment_bottom.png]]
Figure 31-13
[[Image:ios9_stack_view_alignment_center.png]]
Figure 31-14
[[Image:ios9_stack_view_alignment_firstbasline.png]]
Figure 31-15
[[Image:ios9_stack_view_alignment_lastbasline.png]]
Figure 31-16