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
220
モディファイアについて理解しよう
jambo-develop-team
March 11, 2024
Tweet
Share
More Decks by jambo-develop-team
See All by jambo-develop-team
会社紹介資料_株式会社ジャンボ
jambo_develop_team
0
1k
株式会社Jambo紹介資料
jambo_develop_team
0
630
StoreKit2を使用した課金実装
jambo_develop_team
0
210
AppDelegateで何をすべきか
jambo_develop_team
0
280
SwiftUIのpropertyWrapperをふんわり理解する
jambo_develop_team
0
300
JetpackCompose触ってみた
jambo_develop_team
0
7
KMPを触ってみた
jambo_develop_team
0
17
モバイルアプリの通知機能を AmazonSNSで実装する
jambo_develop_team
0
22
アジャイル入門
jambo_develop_team
0
8
Featured
See All Featured
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
42
9.2k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
329
21k
Embracing the Ebb and Flow
colly
84
4.5k
Git: the NoSQL Database
bkeepers
PRO
427
64k
jQuery: Nuts, Bolts and Bling
dougneiner
61
7.5k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
226
22k
Mobile First: as difficult as doing things right
swwweet
222
8.9k
Designing on Purpose - Digital PM Summit 2013
jponch
115
7k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
33
1.9k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
159
15k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
26
1.4k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
44
2.2k
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()ͷޙʹ
.ϞσΟϑΝΠΞ໊ͱॻ͘͜ͱͰ༻͢Δ͜ͱ͕Ͱ͖Δ