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
47
Swift Study Singleton
mcz9mm
July 03, 2017
Tweet
Share
More Decks by mcz9mm
See All by mcz9mm
SwiftUI-List-Pagination
mcz9mm
2
1.9k
ARKit2.0でAppleが伝えたいアプリ体験を考える
mcz9mm
2
890
ゆるく学ぶARKit
mcz9mm
3
1.3k
What’s TCP/UDP?
mcz9mm
0
79
NATサーバーの必要性
mcz9mm
0
79
What’s New in ARKit2.0
mcz9mm
0
71
徳丸本 ログインフォーム
mcz9mm
0
87
arkit+animoji
mcz9mm
0
63
徳丸本8
mcz9mm
0
110
Featured
See All Featured
GraphQLの誤解/rethinking-graphql
sonatard
50
9.2k
Debugging Ruby Performance
tmm1
70
11k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
221
21k
Music & Morning Musume
bryan
41
5.6k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
14
1.5k
YesSQL, Process and Tooling at Scale
rocio
164
13k
Building an army of robots
kneath
300
41k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
19
1.7k
Web development in the modern age
philhawksworth
202
10k
Become a Pro
speakerdeck
PRO
11
4.5k
The Cost Of JavaScript in 2023
addyosmani
16
3.9k
Large-scale JavaScript Application Architecture
addyosmani
504
110k
Transcript
Swift Study Singleton
Singletonͬͯʁ
ͦͷΫϥεͷΠϯελϯε͕1ͭ ͔͠ੜ͞Εͳ͍͜ͱΛอূ͢Δ
σβΠϯύλʔϯͷ̍ͭ
• SingletonΫϥεɺstaticͳSingletonΫϥε ͷΠϯελϯεΛ1ͭ࣋ͭ
• initΛprivateʹ͢Δ͜ͱ
࡞ͬͯΈͨ
• SAVE • LOAD • ͜͜Ͱอଘͨ͠ͷ ผΫϥε͔Βݺͼग़͠Մೳ
ϝΠϯͱͳΔ෦
ͷઃఆ
None
ͷऔಘ
None
End