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
iOSアプリ開発におけるAuto Layout
Search
waka waka
February 19, 2023
Programming
2
71
iOSアプリ開発におけるAuto Layout
学生自主勉強会
【内容】iOSアプリ開発におけるAutoLayoutについて
waka waka
February 19, 2023
Tweet
Share
Other Decks in Programming
See All in Programming
『テスト書いた方が開発が早いじゃん』を解き明かす #phpcon_nagoya
o0h
PRO
6
2.2k
PHPカンファレンス名古屋2025 タスク分解の試行錯誤〜レビュー負荷を下げるために〜
soichi
1
640
Boost Performance and Developer Productivity with Jakarta EE 11
ivargrimstad
0
620
Ça bouge du côté des animations CSS !
goetter
2
130
Honoとフロントエンドの 型安全性について
yodaka
7
1.4k
Introduction to kotlinx.rpc
arawn
0
750
Pulsar2 を雰囲気で使ってみよう
anoken
0
250
バッチを作らなきゃとなったときに考えること
irof
2
480
Jakarta EE meets AI
ivargrimstad
0
170
Multi Step Form, Decentralized Autonomous Organization
pumpkiinbell
1
830
Jakarta EE meets AI
ivargrimstad
0
120
AIの力でお手軽Chrome拡張機能作り
taiseiue
0
190
Featured
See All Featured
Being A Developer After 40
akosma
89
590k
Agile that works and the tools we love
rasmusluckow
328
21k
Typedesign – Prime Four
hannesfritz
40
2.5k
RailsConf 2023
tenderlove
29
1k
Building Better People: How to give real-time feedback that sticks.
wjessup
367
19k
Visualization
eitanlees
146
15k
Building a Modern Day E-commerce SEO Strategy
aleyda
38
7.1k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
7
640
Mobile First: as difficult as doing things right
swwweet
223
9.4k
The World Runs on Bad Software
bkeepers
PRO
67
11k
Making the Leap to Tech Lead
cromwellryan
133
9.1k
Build The Right Thing And Hit Your Dates
maggiecrowley
34
2.5k
Transcript
एྛ྄ޗ iOSΞϓϦ։ൃʹ͓͚ΔAutoLayout
AutoLayoutͱ AutoLayoutͱ͍͏ͷʮ੍ʢConstraintʣʯΛ༻͍ͨϨΠΞτํ๏Ͱ͢ɻ AutoLayoutΛઃఆͨ͠߹ AutoLayoutΛઃఆ͍ͯ͠ͳ͍߹ ϘλϯϥϕϧͳͲͷҐஔΛͳͲͰࢦఆ͠ɺͦΕͧΕͷը໘αΠζʹ߹ΘͤΔ
X্࣠ͷਅΜதʹஔ͍ͨ͠߹ Horizontally in Container Y্࣠ͷਅΜதʹஔ͍ͨ͠߹ Vertically in Container Horizontally in
Container ͱVertically in Container ( 0 , 0 ) iOSΞϓϦࠨ্Λݪʢ0, 0ʣ X࣠ʹ͍ͭͯӈʹߦ͘΄Ͳϓϥε Y࣠ʹ͍ͭͯԼʹߦ͘΄Ͳϓϥε X࣠ Y࣠
Ͱ੍Λ͚ͭΔ બͨ͠ViewͷྡͷViewͱͷεϖʔεαΠζͷؔΛද͢ ɾSpacing to nearest - ྡͷViewͱͷڑ ɾWidth - ԣ෯ͷ͞
ɾHeight - ߴ͞ ɾEqual Width - ಉ͡෯ʹ͢Δ ɾEqual Heights - ಉ͡ߴ͞ʹ͢Δ ɾAspect Ratio - ΞεϖΫτൺΛݻఆ͢Δ
StackView - ಉ͡Α͏ͳΦϒδΣΫτΛ·ͱΊͯҰͭͷΦϒδΣΫτʹͯ͘͠ΕΔͱ͍͏ΦϒδΣΫτ StackViewΛ͏ͱઃఆ͢Δ੍Λ࠷খݶʹ͢Δ͜ͱ͕Ͱ͖Δ Vertically Stack View - ਨํʢY࣠ʣʹΦϒδΣΫτΛฒΔ StackView
Horizontally Stack View - ਫฏํʢX࣠ʣʹΦϒδΣΫτΛฒΔ
ϩάΠϯը໘࡞ iPhone 14 Pro iPhone SE (3rd)