Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
ObservationSallowDive
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
elmetal
PRO
June 21, 2023
Programming
410
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
ObservationSallowDive
elmetal
PRO
June 21, 2023
More Decks by elmetal
See All by elmetal
プロダクトコードからライブラリの境界を見つける
elmetal
PRO
0
110
SwiftUI Text Rendering Deep Dive
elmetal
PRO
0
46
The Integrity of Making: Extending Xcode Previews with MCP
elmetal
PRO
0
47
Generating DocC with AI
elmetal
PRO
0
78
A Swift Way to Blog
elmetal
PRO
0
260
Designing DocC for Clarity and Beauty
elmetal
PRO
0
150
SwiftUI Viewの責務分離
elmetal
PRO
2
550
サイボウズiOSアプリのマルチモジュール 2024
elmetal
PRO
0
160
開発を加速する共有Swift Package実践
elmetal
PRO
0
1.5k
Other Decks in Programming
See All in Programming
【加筆修正版】Laravel のアプリケーションをどこにデプロイするか #phpcon_ehime
akase244
0
150
Atomic Design, Enforced: Scaling Mobile Design Systems (next.app devCon / droidCon Berlin 2026)
steliosf
PRO
0
140
Starting & Sustaining Code-Based E2E Testing for Non-Coding QA Teams( #jasstniigata )
teyamagu
PRO
1
930
カツオ、ご期待ください
suneo3476
0
150
setup-vp GitLab対応の裏側
naokihaba
0
150
Simple Storage Service(S3) is not simple
iwatsukayura
0
220
設計次第でAIコードの読む量は減らせる / designing-for-code-reading
minodriven
34
16k
iOS 27でニュースアプリはどう変わる!? 〜日経電子版の新機能対応と、開発事例から〜
lynnswap
7
13k
Everything will be SERVERLESS — 信じて運用した10年の経験値 / Everything Will be Serverless — Lessons Learned from 10 Years of Operational Experience
seike460
PRO
1
820
Herb in Rails 8.2: Your ERB views, now HTML-aware @ Rails World 2026, Austin, Texas
marcoroth
0
190
難しいけど、読めた。- OSSの入口に立った話。
sts11142
0
140
[ハンズオン]AIへの指示だけで「五目並べ」を作ってみよう
satoshi256kbyte
1
350
Featured
See All Featured
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
35
2.9k
We Are The Robots
honzajavorek
0
390
Ecommerce SEO: The Keys for Success Now & Beyond - #SERPConf2024
aleyda
1
2.2k
SEO for Brand Visibility & Recognition
aleyda
0
4.8k
What the history of the web can teach us about the future of AI
inesmontani
PRO
2
730
Ruling the World: When Life Gets Gamed
codingconduct
0
390
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
720
How to train your dragon (web standard)
notwaldorf
96
6.9k
Reality Check: Gamification 10 Years Later
codingconduct
0
2.3k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.8k
Skip the Path - Find Your Career Trail
mkilby
1
250
[RailsConf 2023] Rails as a piece of cake
palkan
59
7.1k
Transcript
0CTFSWBUJPO4BMMPX%JWF $ZCP[V.PCJMF.FFUVQ FMNFUBM$ZCP[V *OD
"CPVUNF !FM@NFUBM@ J04"QQ %FWFMPQFS J04ΞϓϦ։ൃ ڝഅ ରઓήʔϜ
8IBUJT0CTFSWBUJPO w ݎ࿚ɾλΠϓηʔϑɾߴύϑΥʔϚϯεͷΦϒβʔόʔύλʔϯΛఏڙ͢Δ w ϓϩύςΟͷมߋΛ͢ΔͨΊͷ৽͍͠4XJGUͷػೳ w 4XJGUͷ௨ৗͷܕͱҰॹʹಈ࡞͠ɺϚΫϩͰม͢Δ w A!0CTFSWBUJPOAΛՃ͢Δ͚ͩͰಈ͘ 0CTFSWBUJPO
8IZ0CTFSWBUJPO
8IZ0CTFSWBUJPO 0UIFSNFDIBOJTNTGPSPCTFSWBUJPOJO4XJGU w ,70 LFZWBMVFPCTFSWJOH w 0CTFSWBCMF0CKFDU
8IZ0CTFSWBUJPO 0UIFSNFDIBOJTNTGPSPCTFSWBUJPOJO4XJGU w ,70 LFZWBMVFPCTFSWJOH ˠ/40CKFDUͷܧঝ͕ඞཁ ˠΠϕϯτͷΠϯλʔηϓτ͔͠ఏڙ͞Εͳ͍ͷͰɺ௨͕XJMM4FUͱEJE4FUͷؒͰߦΘΕΔ
ˠΠϕϯτཻʹॊೈੑ͕͋Δ͕ɺ߹ੑʹ͚ܽΔ ˠ0CKFDUJWF$ϥϯλΠϜʹґଘ͢Δ ˠLFZQBUIͰڧ͍ܕ͚͕͞Ε͍ͯΔʹؔΘΒͣɺ࣮ࡍจࣈྻܕ͚͞Ε͍ͯΔ w 0CTFSWBCMF0CKFDU ˠ%BSXJOͰ͔͑͠ͳ͍ ˠQSFDPODVSSFODZͳ$PNCJOF͕ඞཁ ˠܕͷ४ڌ͚ͩͰͳ͘ɺ؍ଌ͞ΕΔϓϩύςΟʹA!1VCMJTIFEA͕ඞཁ ˠDPNQVUFEQSPQFSUZΛ؍ଌͰ͖ͳ͍ ˠDIBOHFFWFOUͷ։࢝࣌ʹੜ͞ΕΔͷͰɺ৽͍͕͠ઃఆ͞ΕΔલʹશͯͷ͕ྲྀΕΔ
4PMVUJPOTUPQSPCMFNTPUIFSNFDIBOJTNTGPSPCTFSWBUJPO w A!0CTFSWBCMFAΞϊςʔγϣϯͰܕࣗମΛPCTFSWBCMFʹ͢Δ w 0CTFSWBCMFϚΫϩʹΑΓɺϓϩτίϧ४ڌͱϓϩύςΟͷτϥοΩϯάΛ࣮ ͢Δ ˠϓϩύςΟ͝ͱʹݸผͷϚʔΩϯά͕ෆཁ 8IZ0CTFSWBUJPO
6TJOH0CTFSWBUJPO
6TJOH!0CTFSWBCMF 6TJOH0CTFSWBUJPO @Observable class FoodTruckModel { var orders: [Order] =
[] var donuts = Donut.all }
6TJOH!0CTFSWBCMF 6TJOH0CTFSWBUJPO @Observable class FoodTruckModel { var orders: [Order] =
[] var donuts = Donut.all } ΞϊςʔγϣϯҰՕॴ શϓϩύςΟ͕τϥοΩϯάͰ͖Δ
&YQBOE.BDSP 6TJOH0CTFSWBUJPO @Observable class FoodTruckModel { @ObservationTracked var orders: [Order]
= [] @ObservationTracked var donuts = Donut.all @ObservationIgnored private let _$observationRegistrar = ObservationRegistrar() internal nonisolated func access<Member>( keyPath: KeyPath<FoodTruckModel , Member> ) { _$observationRegistrar.access(self, keyPath: keyPath) } internal nonisolated func withMutation<Member, T>( keyPath: KeyPath<FoodTruckModel , Member>, _ mutation: () throws -> T ) rethrows -> T { try _$observationRegistrar.withMutation(of: self, keyPath: keyPath, mutation) } @ObservationIgnored private var _orders: [Order] = [] @ObservationIgnored private var _donuts = Donut.all } extension FoodTruckModel : Observable {}
4XJGU6*QSPQFSUZUSBDLJOH 6TJOH0CTFSWBUJPO @Observable class FoodTruckModel { var orders: [Order] =
[] var donuts = Donut.all } struct DonutMenu: View { let model: FoodTruckModel var body: some View { List { Section("Donuts") { ForEach(model.donuts) { donut in Text(donut.name) } Button("Add new donut") { model.addDonut() } } } } }
4XJGU6*QSPQFSUZUSBDLJOH 6TJOH0CTFSWBUJPO @Observable class FoodTruckModel { var orders: [Order] =
[] var donuts = Donut.all } struct DonutMenu: View { let model: FoodTruckModel var body: some View { List { Section("Donuts") { ForEach(model.donuts) { donut in Text(donut.name) } Button("Add new donut") { model.addDonut() } } } } } Ξϊςʔγϣϯ͕ෆཁ
6TJOH1SPQFSUZ8SBQQFS
6TJOH!4UBUF 6TJOH1SPQFSUZ8SBQQFS struct DonutListView: View { var donutList: DonutList @State
private var donutToAdd: Donut? var body: some View { List(donutList.donuts) { DonutView(donut: $0) } Button("Add Donut") { donutToAdd = Donut() } .sheet(item: $donutToAdd) { TextField("Name", text: $donutToAdd.name) Button("Save") { donutList.donuts.append(donutToAdd) donutToAdd = nil } Button("Cancel") { donutToAdd = nil } } } }
6TJOH!&OWJSPONFOU 6TJOH1SPQFSUZ8SBQQFS @Observable class Account { var userName: String?
} struct FoodTruckMenuView : View { @Environment(Account.self) var account var body: some View { if let name = account.userName { HStack { Text(name); Button("Log out") { account.logOut() } } } else { Button("Login") { account.showLogin() } } } }
6TJOH!#JOEBCMF 6TJOH1SPQFSUZ8SBQQFS @Observable class Donut { var name: String
} struct DonutView: View { @Bindable var donut: Donut var body: some View { TextField("Name", text: $donut.name) } }
4UPSJOH!0CTFSWBCMFUZQFTJO"SSBZ 6TJOH1SPQFSUZ8SBQQFS @Observable class Donut { var name: String
} struct DonutList: View { var donuts: [Donut] var body: some View { List(donuts) { donut in HStack { Text(donut.name) Spacer() Button("Randomize") { donut.name = randomName() } } } } }
3FGFSFODFT
w %JTDPWFS0CTFSWBUJPOJO4XJGU6* IUUQTEFWFMPQFSBQQMFDPNWJEFPTQMBZXXED w "QQMF%FWFMPQFS%PDVNFOUBUJPO0CTFSWBUJPO IUUQTEFWFMPQFSBQQMFDPNEPDVNFOUBUJPO0CTFSWBUJPO 3FGFSFODFT