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
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
32
5.9k
Become a Pro
speakerdeck
PRO
28
5.4k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
31
1.2k
Into the Great Unknown - MozCon
thekraken
39
1.9k
A Tale of Four Properties
chriscoyier
160
23k
Keith and Marios Guide to Fast Websites
keithpitt
411
22k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
3.9k
Balancing Empowerment & Direction
lara
1
340
Agile that works and the tools we love
rasmusluckow
329
21k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
Building Flexible Design Systems
yeseniaperezcruz
328
39k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
161
15k
Transcript
Swift Study Singleton
Singletonͬͯʁ
ͦͷΫϥεͷΠϯελϯε͕1ͭ ͔͠ੜ͞Εͳ͍͜ͱΛอূ͢Δ
σβΠϯύλʔϯͷ̍ͭ
• SingletonΫϥεɺstaticͳSingletonΫϥε ͷΠϯελϯεΛ1ͭ࣋ͭ
• initΛprivateʹ͢Δ͜ͱ
࡞ͬͯΈͨ
• SAVE • LOAD • ͜͜Ͱอଘͨ͠ͷ ผΫϥε͔Βݺͼग़͠Մೳ
ϝΠϯͱͳΔ෦
ͷઃఆ
None
ͷऔಘ
None
End