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
1.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
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
160
15k
Building a Scalable Design System with Sketch
lauravandoore
461
33k
Java REST API Framework Comparison - PWX 2021
mraible
29
8.4k
Site-Speed That Sticks
csswizardry
4
410
Six Lessons from altMBA
skipperchong
27
3.6k
The Cult of Friendly URLs
andyhume
78
6.2k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
53k
Done Done
chrislema
182
16k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
33
2.8k
Side Projects
sachag
452
42k
Producing Creativity
orderedlist
PRO
344
40k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
4
430
Transcript
Swift Study Singleton
Singletonͬͯʁ
ͦͷΫϥεͷΠϯελϯε͕1ͭ ͔͠ੜ͞Εͳ͍͜ͱΛอূ͢Δ
σβΠϯύλʔϯͷ̍ͭ
• SingletonΫϥεɺstaticͳSingletonΫϥε ͷΠϯελϯεΛ1ͭ࣋ͭ
• initΛprivateʹ͢Δ͜ͱ
࡞ͬͯΈͨ
• SAVE • LOAD • ͜͜Ͱอଘͨ͠ͷ ผΫϥε͔Βݺͼग़͠Մೳ
ϝΠϯͱͳΔ෦
ͷઃఆ
None
ͷऔಘ
None
End