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
52
Swift Study Singleton
mcz9mm
July 03, 2017
Tweet
Share
More Decks by mcz9mm
See All by mcz9mm
SwiftUI-List-Pagination
mcz9mm
2
2.2k
ARKit2.0でAppleが伝えたいアプリ体験を考える
mcz9mm
2
1k
ゆるく学ぶARKit
mcz9mm
3
1.4k
What’s TCP/UDP?
mcz9mm
0
100
NATサーバーの必要性
mcz9mm
0
87
What’s New in ARKit2.0
mcz9mm
0
87
徳丸本 ログインフォーム
mcz9mm
0
98
arkit+animoji
mcz9mm
0
64
徳丸本8
mcz9mm
0
110
Featured
See All Featured
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
251
21k
Build The Right Thing And Hit Your Dates
maggiecrowley
34
2.5k
Reflections from 52 weeks, 52 projects
jeffersonlam
348
20k
Stop Working from a Prison Cell
hatefulcrawdad
267
20k
Fantastic passwords and where to find them - at NoRuKo
philnash
51
3k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.1k
Side Projects
sachag
452
42k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
27
1.5k
Keith and Marios Guide to Fast Websites
keithpitt
411
22k
Site-Speed That Sticks
csswizardry
3
370
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
366
25k
Transcript
Swift Study Singleton
Singletonͬͯʁ
ͦͷΫϥεͷΠϯελϯε͕1ͭ ͔͠ੜ͞Εͳ͍͜ͱΛอূ͢Δ
σβΠϯύλʔϯͷ̍ͭ
• SingletonΫϥεɺstaticͳSingletonΫϥε ͷΠϯελϯεΛ1ͭ࣋ͭ
• initΛprivateʹ͢Δ͜ͱ
࡞ͬͯΈͨ
• SAVE • LOAD • ͜͜Ͱอଘͨ͠ͷ ผΫϥε͔Βݺͼग़͠Մೳ
ϝΠϯͱͳΔ෦
ͷઃఆ
None
ͷऔಘ
None
End