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
56
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
100
NATサーバーの必要性
mcz9mm
0
96
What’s New in ARKit2.0
mcz9mm
0
97
徳丸本 ログインフォーム
mcz9mm
0
100
arkit+animoji
mcz9mm
0
67
徳丸本8
mcz9mm
0
120
Featured
See All Featured
Facilitating Awesome Meetings
lara
54
6.4k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
19
1.3k
The World Runs on Bad Software
bkeepers
PRO
68
11k
[RailsConf 2023] Rails as a piece of cake
palkan
55
5.6k
Building a Modern Day E-commerce SEO Strategy
aleyda
40
7.3k
A Modern Web Designer's Workflow
chriscoyier
693
190k
Thoughts on Productivity
jonyablonski
69
4.7k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
26k
How GitHub (no longer) Works
holman
314
140k
Building Applications with DynamoDB
mza
95
6.4k
Producing Creativity
orderedlist
PRO
346
40k
Building an army of robots
kneath
306
45k
Transcript
Swift Study Singleton
Singletonͬͯʁ
ͦͷΫϥεͷΠϯελϯε͕1ͭ ͔͠ੜ͞Εͳ͍͜ͱΛอূ͢Δ
σβΠϯύλʔϯͷ̍ͭ
• SingletonΫϥεɺstaticͳSingletonΫϥε ͷΠϯελϯεΛ1ͭ࣋ͭ
• initΛprivateʹ͢Δ͜ͱ
࡞ͬͯΈͨ
• SAVE • LOAD • ͜͜Ͱอଘͨ͠ͷ ผΫϥε͔Βݺͼग़͠Մೳ
ϝΠϯͱͳΔ෦
ͷઃఆ
None
ͷऔಘ
None
End