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 Study Singleton
Search
mcz9mm
July 03, 2017
0
58
Swift Study Singleton
mcz9mm
July 03, 2017
Tweet
Share
More Decks by mcz9mm
See All by mcz9mm
SwiftUI-List-Pagination
mcz9mm
2
2.3k
ARKit2.0でAppleが伝えたいアプリ体験を考える
mcz9mm
2
1.1k
ゆるく学ぶARKit
mcz9mm
3
1.5k
What’s TCP/UDP?
mcz9mm
0
110
NATサーバーの必要性
mcz9mm
0
100
What’s New in ARKit2.0
mcz9mm
0
100
徳丸本 ログインフォーム
mcz9mm
0
110
arkit+animoji
mcz9mm
0
69
徳丸本8
mcz9mm
0
130
Featured
See All Featured
Scaling GitHub
holman
459
140k
Balancing Empowerment & Direction
lara
1
340
Rebuilding a faster, lazier Slack
samanthasiow
81
9k
The Straight Up "How To Draw Better" Workshop
denniskardys
233
140k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
30
2.1k
Fashionably flexible responsive web design (full day workshop)
malarkey
407
66k
Art, The Web, and Tiny UX
lynnandtonic
299
21k
Faster Mobile Websites
deanohume
307
31k
Measuring & Analyzing Core Web Vitals
bluesmoon
7
490
XXLCSS - How to scale CSS and keep your sanity
sugarenia
248
1.3M
Understanding Cognitive Biases in Performance Measurement
bluesmoon
29
1.8k
Gamification - CAS2011
davidbonilla
81
5.3k
Transcript
Swift Study Singleton
Singletonͬͯʁ
ͦͷΫϥεͷΠϯελϯε͕1ͭ ͔͠ੜ͞Εͳ͍͜ͱΛอূ͢Δ
σβΠϯύλʔϯͷ̍ͭ
• SingletonΫϥεɺstaticͳSingletonΫϥε ͷΠϯελϯεΛ1ͭ࣋ͭ
• initΛprivateʹ͢Δ͜ͱ
࡞ͬͯΈͨ
• SAVE • LOAD • ͜͜Ͱอଘͨ͠ͷ ผΫϥε͔Βݺͼग़͠Մೳ
ϝΠϯͱͳΔ෦
ͷઃఆ
None
ͷऔಘ
None
End