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
Fat ViewControllerを倒せ! 〜Cocoa MVC への道のり〜 / No M...
Search
Elvis Shi
May 30, 2020
Programming
0
790
Fat ViewControllerを倒せ! 〜Cocoa MVC への道のり〜 / No More Fat ViewController! ~The path to Cocoa MVC~
Elvis Shi
May 30, 2020
Tweet
Share
More Decks by Elvis Shi
See All by Elvis Shi
How did I build an Open-Source SwiftUI Toast Library
lovee
1
48
SwiftUIで使いやすいToastの作り方 / How to build a Toast system which is easy to use in SwiftUI
lovee
3
660
SwiftUIで二重スクロール作ってみた / When I tried to make a dual-scroll-ish view in SwiftUI
lovee
1
240
Observation のあれこれ / A brief introduction about Observation
lovee
3
330
ChatGPT 時代の勉強 / Learning under ChatGPT era
lovee
26
8.2k
属人化しない為の勉強会作り / To make tech meetups with less personal dependencies
lovee
0
270
偏見と妄想で語るスクリプト言語としての Swift / Swift as a Scripting Language
lovee
2
790
danger-swift-kantoku
lovee
1
490
Decimal、正しく使ってる? / Are you using Decimal correctly?
lovee
4
690
Other Decks in Programming
See All in Programming
3 Effective Rules for Using Signals in Angular
manfredsteyer
PRO
0
100
型付き API リクエストを実現するいくつかの手法とその選択 / Typed API Request
euxn23
8
2.2k
ピラミッド、アイスクリームコーン、SMURF: 自動テストの最適バランスを求めて / Pyramid Ice-Cream-Cone and SMURF
twada
PRO
10
1.3k
Click-free releases & the making of a CLI app
oheyadam
2
110
Generative AI Use Cases JP (略称:GenU)奮闘記
hideg
1
290
Kaigi on Rails 2024 〜運営の裏側〜
krpk1900
1
200
watsonx.ai Dojo #4 生成AIを使ったアプリ開発、応用編
oniak3ibm
PRO
1
100
AI時代におけるSRE、 あるいはエンジニアの生存戦略
pyama86
6
1.1k
Amazon Qを使ってIaCを触ろう!
maruto
0
400
카카오페이는 어떻게 수천만 결제를 처리할까? 우아한 결제 분산락 노하우
kakao
PRO
0
110
Realtime API 入門
riofujimon
0
150
Flutterを言い訳にしない!アプリの使い心地改善テクニック5選🔥
kno3a87
1
170
Featured
See All Featured
Code Review Best Practice
trishagee
64
17k
A Modern Web Designer's Workflow
chriscoyier
693
190k
Being A Developer After 40
akosma
86
590k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
4
370
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
47
5k
Side Projects
sachag
452
42k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
33
1.9k
GitHub's CSS Performance
jonrohan
1030
460k
Thoughts on Productivity
jonyablonski
67
4.3k
How STYLIGHT went responsive
nonsquared
95
5.2k
How to Think Like a Performance Engineer
csswizardry
20
1.1k
Put a Button on it: Removing Barriers to Going Fast.
kastner
59
3.5k
Transcript
'BU7JFX$POUSPMMFSΛͤʂ ʙ$PDPB.7$ͷಓͷΓʙ f o r 4X J G U
;P PN J O Ԇ ઓ
} var employedBy = "YUMEMI Inc." var job = "iOS
Tech Lead" var favoriteLanguage = "Swift" var twitter = "@lovee" var qiita = "lovee" var github = "el-hoshino" var additionalInfo = """ Twitter෮׆ͨ͠ʂ """ final class Me: Developable, Talkable {
IUUQTHJUIVCDPNSFGBDUPSJOHDIBMMFOHFSFWFSTJJPT
طଘϓϩδΣΫτͷ w ϩδοΫ͕༷ʑͳॴʹࠞࡏ͍ͯ͠Δ w ϦηοτϩδοΫ͕BoardViewʹ w ਐߦϩδοΫ͕ViewControllerʹ w ൫αΠζϩδοΫ͕BoardViewʹ w
ΞχϝʔγϣϯϩδοΫ͕ViewControllerʹ
$PDPB.7$ͷߏ 7JFX$POUSPMMFS .PEFM 7JFX ߦಈ ૢ࡞ ௨ ߋ৽
$PDPB.7$ͷߏ w .PEFMɿήʔϜϩδοΫͷॲཧ w 7JFXɿը໘ඳըͱɺϢʔβΞΫγϣϯͷड w 7JFX$POUSPMMFSɿ7JFXͱ.PEFMͷՍ͚ڮ
$PDPB.7$ͷߏ w (BNF&OHJOFɿήʔϜϩδοΫͷॲཧ w #PBSE7JFXɿը໘ඳըͱɺϢʔβΞΫγϣϯͷड w 7JFX$POUSPMMFSɿ#PBSE7JFXͱ(BNF&OHJOFͷ Ս͚ڮ
मਖ਼ํʢίϯϙʔωϯτʣ w (BNF&OHJOFʹશͯͷήʔϜϩδοΫΛू w 7JFX$POUSPMMFSͱ#PBSE7JFXͷήʔϜϩδοΫ Λશͯ(BNF&OHJOFʹҠಈ w #PBSE7JFXʹඳըॲཧͷΈΛ͢ w ήʔϜϧʔϧʹґଘͤͣɺݴΘΕͨ௨Γʹ͢Δ
͚ͩͷඳըϩδοΫ w طଘͷॲཧίʔυࣗମ࠷খݶͷमਖ਼Ͱ
मਖ਼ํʢσʔλϑϩʔʣ w ॲཧͷྲྀΕΛҰຊಓԽ w BoardView͕ϢʔβΞΫγϣϯΛड͚ͨΒ@IBAction ͘͠delegate௨ͯ͠ViewControllerʹୡ w ViewController͕ΒͬͨϢʔβΞΫγϣϯΛݩʹ GameEngineΛૢ࡞ w
GameEngine͕ಠࣗઐ༻εϨουͰૢ࡞Λॲཧ͠ɺͦͷ݁Ռ ΛAnyPublisherͰViewControllerʹ௨ w ViewController͕Βͬͨ݁ՌΛݩʹϝΠϯεϨουͰ BoardViewΛߋ৽ w BoardView͕ͦͷ݁Ռͷ௨Γʹඳը
$PDPB.7$ͷߏ 7JFX$POUSPMMFS .PEFM 7JFX ૢ࡞ ௨ ߋ৽ ߦಈ
$PDPB.7$ͷߏ 7JFX$POUSPMMFS (BNF&OHJOF #PBSE7JFX ૢ࡞ ௨ ߋ৽ ߦಈ
$PDPB.7$ͷߏ 7JFX$POUSPMMFS (BNF&OHJOF #PBSE7JFX reset() setPlayer(_:for:) getPlayer(for:)-> placeDisk(at:) nextMove() currentBoard{get}
saveGame() loadGame() $isThinking $changedDisks $currentTurn $currentCount boardSize{set} changeDisks(at:to:) reset(with:) @pressReset(_:) @changePlayerControl(_:) .didSelectCell(at:) $AnyPublisherͱͯ͠ฦ͞ΕΔ @@IBActionΛ௨ͯ͠ݺΕΔ .delegateΛ௨ͯ͠ݺΕΔ
%&.0
ল w ෦࡞ͬͯॲཧΛҠಈ͢Δલʹɺ͏গ͠ϝιουΛ ࡉ͔͘Γग़͖ͩͬͨ͢ w ॲཧͷҠಈͱϝιουͷΓग़͠ͱςετͷ࣮ͷ ಉ࣌ฒߦ͕ڧ͍ΒΕͯେมͩͬͨ w ͞Βʹͦͷ͍ͤͰ్த͔Βςετॻ͘ͷఘΊͨ
ͦͷଞ w $PDPB.7$ͷߏͷઆ໌͚ͩͳͷͰɺGameEngine ͕·ͩগʑ'BU w GameEngineΛ७ਮؔԽͯ͠ɺ֤छঢ়ଶΛ͞Βʹ GameStoreͱ͔ʹΓग़ͤߋʹ͖Ε͍ʹͳΔ w ͬͺ6*,JUʹͱͬͯ$PDPB.7$ָʂ w
protocolͰ@Published<Value>ͱ͔ΛએݴͰ͖Δ Α͏ʹͯ͠΄͍͠ w ࠓAnyPublisher<Value, Never> { get }Ͱ ఆٛ͢Δ͔͠ͳ͍ͷ͕ඍົʹਏ͍