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
モディファイアについて理解しよう
Search
jambo-develop-team
March 11, 2024
0
240
モディファイアについて理解しよう
jambo-develop-team
March 11, 2024
Tweet
Share
More Decks by jambo-develop-team
See All by jambo-develop-team
会社紹介資料_株式会社ジャンボ
jambo_develop_team
0
1.4k
株式会社Jambo紹介資料
jambo_develop_team
0
640
StoreKit2を使用した課金実装
jambo_develop_team
0
240
AppDelegateで何をすべきか
jambo_develop_team
0
310
SwiftUIのpropertyWrapperをふんわり理解する
jambo_develop_team
0
340
JetpackCompose触ってみた
jambo_develop_team
0
7
KMPを触ってみた
jambo_develop_team
0
17
モバイルアプリの通知機能を AmazonSNSで実装する
jambo_develop_team
0
28
アジャイル入門
jambo_develop_team
0
9
Featured
See All Featured
Building a Scalable Design System with Sketch
lauravandoore
460
33k
The Cult of Friendly URLs
andyhume
78
6.1k
What’s in a name? Adding method to the madness
productmarketing
PRO
22
3.2k
jQuery: Nuts, Bolts and Bling
dougneiner
62
7.6k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
10
850
Typedesign – Prime Four
hannesfritz
40
2.5k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
29
2k
The Power of CSS Pseudo Elements
geoffreycrofte
74
5.4k
How to Think Like a Performance Engineer
csswizardry
22
1.3k
For a Future-Friendly Web
brad_frost
176
9.5k
[RailsConf 2023] Rails as a piece of cake
palkan
53
5.1k
Automating Front-end Workflow
addyosmani
1366
200k
Transcript
3/6 ϞσΟϑΝΠΞʹ͍ͭͯཧղ͠Α͏
ΞδΣϯμ • తͱඪ • લճ·ͰͷৼΓฦΓ • ϞσΟϑΝΠΞͱʁ • Կ͕Ͱ͖Δͷʁ •
Ͳ͏༻͢Δͷʁ
తͱඪ • త • νʔϜ͕ྲྀಈతʹมԽͯ͠ɺٕज़తʹ֤ νʔϜʹೃછΈ͘͢͢ΔͨΊ • ੵۃతʹٕज़ΛΩϟονΞοϓ͢Δ͜ͱͰ ϞόΠϧΤϯδχΞશମͷٕज़ͷఈ্͛Λ ͢ΔͨΊ
• ඪ • ϞσΟϑΝΠΞͱԿ͔Λཧղ͢Δ • ϞσΟϑΝΠΞΛ༻͢Δ͜ͱͰԿ͕Ͱ͖ Δͷ͔Λཧղ͢Δ • ϞσΟϑΝΠΞΛͲ͏ͬͯ༻͢Δ͔Λ ཧղ͢Δ
લճ·ͰͷৼΓฦΓ • UIKitʹൺͯɺSwiftUI • VStack, HStack, ZStackͦΕͧΕཁૉΛ ը໘Λ͙͢ʹ࡞Ε͍ͯճ͍͢͠͠ʂ VStack:ɹॎʹཁૉΛฒΔ HStack:ɹԣʹཁૉΛฒΔ
ZStack:ɹલޙʹཁૉΛฒΔ
ϞσΟϑΝΠΞͱʁ
ϞσΟϑΝΠΞͱʁ SwiftUIͷViewViewComponentʹରͯ͠ɺ ݟͨৼΔ͍ΛΧελϚΠζ͢ΔͨΊͷϝ ιου ※ Text, ImageVStackͳͲɺViewΛߏ͢Δཁૉͷ͜ͱΛࢦ͢ ※
ϞσΟϑΝΠΞͱʁ - ͏গ͠ৄ͘͠ - • ϞσΟϑΝΠΞͷਖ਼ମViewϓϩτίϧʹ४ ڌͨ͠ߏମͷϝιου • Text()VStack()ͳͲUI෦શͯViewϓϩτ ίϧΛ४ڌ͍ͯ͠ΔͨΊɺϞσΟϑΝΠΞͷ
ϝιουΛ༻͢Δ͜ͱ͕Ͱ͖Δ ࣮ࡍͷؔ
Կ͕Ͱ͖ΔΑ͏ʹͳΔͷʁ
Կ͕Ͱ͖Δͷ͔ʁ ViewͷUIৼΔ͍Λมߋ͢Δ͜ͱ͕Ͱ͖Δ ελΠϧɺϨΠΞτɺಈ࡞ΛΧελϚΠζ ϞσΟϑΝΠΞద༻લͷςΩετ ϞσΟϑΝΠΞద༻ޙͷςΩετ
Ͳ͏ͬͯ༻͢Δͷ͔ʁ
Ͳ͏༻͢Δ͔ʁ Text()Button()ͷޙʹ .ϞσΟϑΝΠΞ໊ Ͱ༻͢Δ͜ͱ͕Ͱ͖Δ
Ͳ͏༻͢Δͷ͔ʁ- ͏গ͠ৄ͘͠ - ίʔυ γϡϛϨʔλʔ
modifierϝιουͱ.fontWeightԿ͕ҧ ͏ͷʁ ϞσΟϑΝΠΞͷؔ .fontWeightϞσΟϑΝΠΞ
·ͱΊ • ϞσΟϑΝΠΞͱɺ • ϞσΟϑΝΠΞΛ༻͢Δ͜ͱͰɺ • ϞσΟϑΝΠΞɺ SwiftUIͷ7JFX7JFX$PNQPOFOUʹରͯ͠ɺݟͨৼΔ͍ΛΧελϚΠζ͢ΔͨΊͷϝιου ViewͷݟͨৼΔ͍Λมߋ͢Δ͜ͱ͕Ͱ͖Δ Text()ɺButton()ͷޙʹ
.ϞσΟϑΝΠΞ໊ͱॻ͘͜ͱͰ༻͢Δ͜ͱ͕Ͱ͖Δ