Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Swiftで作るiOSアプリ開発入門_03
Search
jollyjoester
February 20, 2016
Education
110
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Swiftで作るiOSアプリ開発入門_03
Schoo講義資料
jollyjoester
February 20, 2016
More Decks by jollyjoester
See All by jollyjoester
印西市創業実践プログラム2026 【AI活用講座】
jollyjoester
0
28
AI時代でも変わらない技術コミュニティの力 ~10年続く"ゆるい"つながりが生み出す価値~
jollyjoester
0
20
AIコードアシスタントとiOS開発
jollyjoester
1
370
市民のためのセキュリティ講座
jollyjoester
0
91
コミュニティMTG in WWDC24
jollyjoester
0
360
BengaluruでLTしてきた
jollyjoester
0
400
try! Swift Tokyo 2024
jollyjoester
0
400
エンジニアが直接会う場の価値について
jollyjoester
8
4.7k
来年Proposalを出すつもりで参加するときっともっと楽しい!
jollyjoester
0
420
Other Decks in Education
See All in Education
Soluciones al examen de Geografía 2026. JUNIO (Convocatoria Ordinaria)
juanmartin2026
0
2.2k
Laura Wilson - The Quarterly PR Pivot
laurawilsonbseo1
1
340
Science Tokyo国際卓越研究大学計画_202604
sciencetokyo
PRO
0
4k
Visualisation Techniques - Lecture 8 - Information Visualisation (4019538FNR)
signer
PRO
1
3.1k
2026年度春学期 統計学 第3回 クロス集計と感度・特異度,データの可視化 (2026. 4. 23)
akiraasano
PRO
0
140
AI進化史:LLMからAIエージェントへ
mickey_kubo
0
190
✅ レポート採点基準 / How Your Reports Are Assessed
yasslab
PRO
0
360
Modern Data Fetching Techniques in Angular
debug_mode
0
210
Protecting Patrons with Digital Vendors
dsalo
0
200
Stardy 会社紹介資料
stardy
0
330
View Manipulation and Reduction - Lecture 9 - Information Visualisation (4019538FNR)
signer
PRO
1
2.7k
!コスパよくインターンに受かる方法!
ruribou
0
260
Featured
See All Featured
Building Adaptive Systems
keathley
44
3k
brightonSEO & MeasureFest 2025 - Christian Goodrich - Winning strategies for Black Friday CRO & PPC
cargoodrich
3
730
sira's awesome portfolio website redesign presentation
elsirapls
0
280
Prompt Engineering for Job Search
mfonobong
0
340
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.5k
Optimising Largest Contentful Paint
csswizardry
37
3.7k
VelocityConf: Rendering Performance Case Studies
addyosmani
333
25k
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
370
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
YesSQL, Process and Tooling at Scale
rocio
174
15k
First, design no harm
axbom
PRO
2
1.2k
Designing Powerful Visuals for Engaging Learning
tmiket
1
410
Transcript
SwiftͰ࡞Δ iOSΞϓϦ։ൃೖ ̏ݶɿAutoLayoutͰΞϓϦͷݟͨΛ͑Δ 1
ࣗݾհ ࣣౡҒ೭ʢͳͳ͠·ͻͰΏ͖ʣ Reproגࣜձࣾ iPhoneΞϓϦ։ൃ͕͖ 2
ࣗݾհ 3 https://repro.io
ຊίʔεͷඪ ۤΛΓӽ͑ͯ ָ͘͠ΞϓϦ։ൃͰ͖ΔΑ͏ʹͳΔʂ 4
෭ڭࡐ վగ൛ No.1εΫʔϧߨࢣਞʹΑΔ ੈքҰड͚͍ͨ iPhoneΞϓϦ։ൃͷतۀ (ٕज़ධࣾ) 5
ࠓճͷतۀͷඪ AutoLayoutͷ͍ํΛମͰ֮͑Δʂ 6
तۀͷલఏ݅ • ͓खݩͷMacʹXcode(version7.0Ҏ্)͕Πϯετʔ ϧ͞Ε͍ͯΔ͜ͱ • ̎ݶͰ࡞ͬͨϓϩδΣΫτΛ༻ҙ͢Δ 7
ຊͷϝχϡʔ • AutoLayoutͷׂ • AutoLayoutͷઃఆͷํ • AutoLayoutͷ͍ํͷ࿅श 8
AutoLayoutͷׂ 9
AutoLayoutͱԿ͔ʁ ΞϓϦέʔγϣϯͷϢʔβΠϯλʔϑΣΠε ʢಛʹը໘ϨΠΞτʣΛ࡞͢ΔγεςϜ ͭ·ΓݟͨΛ࡞ΔͨΊͷͷ 10
AutoLayoutҎલ • ViewͷαΠζ࠲ඪΛͰࢦఆ • AutoSizingʢView͔Βͷج४ʣ 11
AutoLayoutԿ͕͍͍ͷ͔ʁ ը໘ͷେ͖͖͞ɺҬઃఆʢݴޠͳ Ͳʣͷҧ͍ʹԠͯ͡ಈతʹมԽ͢Δɺ൚ ༻తͳը໘ϨΠΞτΛ࡞Γग़͢͜ͱ͕ Ͱ͖Δʂ 12
AutoLayoutͷઃఆͷํ ·ͣͱʹ͔ͬͯ͘ΈΔ 13
ݱঢ়ͷϓϩδΣΫτ֬ೝ 14 • iPhone5sͱiPhone6PlusͰݟͨΛ ‣ γϛϡϨʔλʔͰ֬ೝ ‣ Assistant EditorͷpreviewͰ֬ೝ
ݱঢ়ͷϓϩδΣΫτ֬ೝ 15 • iPhone5sͱiPhone6PlusͰݟͨΛ ‣ γϛϡϨʔλʔͰ֬ೝ ‣ Assistant EditorͷpreviewͰ֬ೝ
Previewͷ։͖ํ 16
Previewͷ։͖ํ 17
େ͖͍ͩͱࠨ্ʹدΔ 18
ը૾ΛਅΜதʹஔ͢Δ ʢConstraintsઃఆʣ 19
ը૾ΛਅΜதʹஔ͢Δ ʢPreview֬ೝʣ 20
ϥϕϧͷҐஔΛௐ͢Δ ʢҐஔͷConstraintsઃఆʣ 21
ϥϕϧͷҐஔΛௐ͢Δ ʢαΠζͷConstraintsઃఆʣ 22
ϥϕϧͷҐஔΛௐ͢Δ ʢPreview֬ೝʣ 23
ϘλϯͷҐஔΛௐ͢Δ ʢConstraintsઃఆʣ 24 ϥϕϧͱಉ༷
ϘλϯͷҐஔΛௐ͢Δ ʢPreview֬ೝʣ 25
ԣ͖Λ֬ೝ͢Δ ʢPreview֬ೝʣ 26
ϥϕϧͷҐஔΛௐ͢Δ ʢConstraintsฤूͦͷ̍ʣ 27
ϥϕϧͷҐஔΛௐ͢Δ ʢConstraintsฤूͦͷ̎ʣ 28
ؒҧ͑ͨConstraintsΛՃͨ͠߹ ʢҟͳΔWidthΛ̎ݸઃఆʣ 29
ෆཁͳConstraintsͷআ ʢקΊʹैͬͯআʣ 30
ෆཁͳConstraintsͷআ ʢखಈͰআʣ 31
ϥϕϧΛͣΒͯ͠ΈΔ 32
Update Frames 33
Update Frames 34
Update Constraints 35
ConstraintsΛղআ 36
AutoLayoutҰཡ Align 37 Leading Edges ViewͷࠨΛἧ͑ Trailing Edges ViewͷӈΛἧ͑ Top
Edges Viewͷ্Λἧ͑ Bottom Edges ViewͷԼΛἧ͑ Holizontal Centers Viewͷԣํͷத৺ἧ͑ Vertical Centers Viewͷॎํͷத৺ἧ͑ Baselines ViewͷϕʔεϥΠϯἧ͑ Horizontal Center in Container ContainerͰࠨӈத৺ ʹஔ Vertical Center in Container ContainerͰ্Լத৺ ʹஔ
AutoLayoutҰཡ Pin 38 Spacing to nearest neighbor ͓ྡͷViewͱͷεϖʔε Width Viewͷ෯
Height Viewͷߴ͞ Equal Widths ෳͷViewΛಉ͡෯ʹ Equal Heights ෳͷViewΛಉ͡ߴ͞ʹ Aspect Ratio ViewͷॎԣൺΛݻఆ
AutoLayoutͷ͍ํ࿅श 39
࿅श༻ͷViewΛஔ͢Δ 40
࿅श༻ͷViewΛஔ͢Δ 41
ࠨԼʹݻఆ͢Δ 42
ࠨԼʹݻఆ͢Δ 43
ࠨԼʹݻఆ͢Δ 44 Update frames
͏ҰͭฒΔ 45
͏ҰͭฒΔ 46
͏ҰͭฒΔ 47
͏ҰͭฒΔ 48 Update frames
ִؒʹฒΔ 49
ִؒʹฒΔ 50
ִؒʹฒΔ 51
ִؒʹฒΔ 52
ִؒʹฒΔ 53
ִؒʹฒΔ 54
ִؒʹฒΔ 55
ִؒʹฒΔ 56
ִؒʹฒΔ 57 Update frames
ִؒʹฒΔ (Stack ViewͳΒ؆୯ɻͨͩ͠iOS9Ҏ্) 58
ִؒʹฒΔ (Stack ViewͳΒ؆୯ɻͨͩ͠iOS9Ҏ্) 59
ִؒʹฒΔ (Stack ViewͳΒ؆୯ɻͨͩ͠iOS9Ҏ্) 60
ִؒʹฒΔ (Stack ViewͳΒ؆୯ɻͨͩ͠iOS9Ҏ্) 61
ຊͷ͓͞Β͍ • ΞϓϦͷݟͨAutoLayoutͰ࡞Δ • ෦Λઃஔͯ͠Update framesΛ܁Γฦ͍ͯ͘͜͠ ͱ͕جຊʂ • AutoLayoutମͰ֮͑Δ 62
ࠂ 63 http://love-swift.connpass.com/event/25716/ ݄࣍̏Լ०ʂ
ࠂ 64 http://liginc.co.jp/?p=228155 LIGϒϩά࿈ࡌ࢝Ί·ͨ͠ʂ