Changes

Jump to: navigation, search

An iOS 9 Multitasking Example

561 bytes added, 18:28, 17 December 2015
no edit summary
Within Xcode, locate and select the Assets.xcassets entry within the Project Navigator panel to load the asset catalog into the main panel. In the left hand panel, Ctrl-click immediately beneath the existing AppIcons entry and select New Image Set from the resulting menu. Double-click on the new image set entry (which will default to the name image) and change the name to Waterfalls.
Open a Finder window, locate the multitasking_images folder from the code sample download ([http://www.ebookfrenzy.com/code/iOS9BookSamples.zip http://www.ebookfrenzy.com/code/iOS9BookSamples.zip]) and drag and drop the [email protected] file onto the 2x placeholder within the image asset catalog. This portrait image will be displayed within the app when it is displayed using a regular width size class.
Remaining within the asset catalog and with the Waterfalls image set still selected, display the Attributes Inspector panel and change the Width property from Any to Any & Compact. A second row of image placeholders will now appear within the image set. Drag and drop the [email protected] image file from the Finder window onto the 2x [-*] placeholder within the image set. On completion of these steps the image set within the asset catalog should match that shown in Figure 35-1:
[[Image:ios_9_multitasking_image_set.png]]
Figure 35-1
[[Image:ios_9_multitasking_constraints.png]]
Figure 35-2
[[Image:ios_9_multitasking_add_text_view.png]]
Figure 35-3
[[Image:Exampleios_9_multitasking_any_layout.jpgpng]]
Figure 35-4
[[Image:ios_9_multitasking_size_class_change.png]]
Figure 35-5
[[Image:ios_multitasking_compact_width_menu_selection.png]]
Figure 35-6
[[Image:ios_multitasking_dual_axis_settings.png]]
Figure 35-7
[[Image:ios_multitasking_size_class_alignment.png]]
Figure 35-8
[[Image:ios_9_multitasking_height_constraint.png]]
Figure 35-9
[[Image:ios_9_multitasking_constraint_not_installed.png]]
Figure 35-10
[[Image:ios_multitasking_example_split.png]]
Figure 35-11
[[Image:ios_multitasking_example_even_split.png]]
Figure 35-12

Navigation menu