ͦͷଞ: HIGʹै͏
• On iPad, consider placing controls on the sides of the screen in
landscape orientation.
• iPadͷԣ͖ͷը໘Ͱɺૢ࡞ੑͷ؍͔Βը໘ͷ྆ʹஔ͢Δ͜ͱ
ΛקΊΒΕ͍ͯΔ
• https://developer.apple.com/design/human-interface-guidelines/
foundations/layout/
Slide 20
Slide 20 text
UIUserInterfaceIdiomΛ͏ͱ͖
• SizeClassΛߟ্ྀͨ͠ͰiPad͔Ͳ͏͔ఆ͍ͨ͠ͱ͖
• SplitViewͳͲʹରԠ͠ͳ͍߹(Requires Full Screen͕ON)
• ήʔϜͳͲ
traitCollectionDidChange vs willTransition
• willTransitionͷυΩϡϝϯτΛಡΉ
https://developer.apple.com/documentation/uikit/uicontentcontainer/1621511-willtransition
Slide 29
Slide 29 text
willTransitionͷ͍Ͳ͖
• A common use of this method is to make changes to the high-level
presentation style when the current size class changes.
• > ϋΠϨϕϧϓϨθʔςϯγϣϯελΠϧ <
• ΞχϝʔγϣϯΛ͍ͨ࣌͠ͱ͔Ͱ͢Ͷ
(ಡ·ͳ͍)ϋϚΔέʔε
• SketchͷྫͷΑ͏ʹCollectionViewͷFlowLayoutͷinsetʹܭࢉͨ͠Λઃఆ͍ͯ͠Δ߹ɺinset͕
collectionViewͷ෯Λ͑ͯ͠·͏ͱϥϯλΠϜΤϥʔ(negative or zero sizes are not supported in the
fl
ow layout)ͰΫϥογϡ͢Δ
• viewWillTransitionͰcoordinator.animateΛݺͼग़ͨ࣌͠ͷclosure͕ݺΕΔλΠϛϯά
viewWillLayoutSubviewsΑΓޙ
• viewWillLayoutSubviewsͰcollectionViewLayout.invalidateLayout()ΛݺΜͰ͍Δ߹ɺλΠϛϯάతʹ
্هͷΤϥʔ͕ग़Δ߹͕͋Δ
• ͳͥviewWillLayoutSubviewsͰinvalidateLayout()ΛݺͿඞཁ͕͋Δ͔ͱ͍͏ͱɺUITabBarControllerͳ
ͲͰผλϒΛ։͍͍ͯΔ్தʹը໘ճసͳͲΛ͢ΔͱinvalidateLayout()͕ػೳ͠ͳ͍έʔε͕͋Γɺλ
ϒʹ͖ͬͯͨ߹ʹݺͼ͍ͨ