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
840
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
ゼロから始めるPreferenceの実装 / Let's implement Preferences from scratch
lovee
0
78
Kotlin エンジニアへ送る:Swift 案件に参加させられる日に備えて~似てるけど色々違う Swift の仕様 / from Kotlin to Swift
lovee
1
290
個人アプリを2年ぶりにアプデしたから褒めて / I just updated my personal app, praise me!
lovee
0
510
How did I build an Open-Source SwiftUI Toast Library
lovee
1
110
SwiftUIで使いやすいToastの作り方 / How to build a Toast system which is easy to use in SwiftUI
lovee
3
1k
SwiftUIで二重スクロール作ってみた / When I tried to make a dual-scroll-ish view in SwiftUI
lovee
1
320
Observation のあれこれ / A brief introduction about Observation
lovee
3
390
ChatGPT 時代の勉強 / Learning under ChatGPT era
lovee
27
8.8k
属人化しない為の勉強会作り / To make tech meetups with less personal dependencies
lovee
0
330
Other Decks in Programming
See All in Programming
AIエージェント開発、DevOps and LLMOps
ymd65536
1
330
レガシープロジェクトで最大限AIの恩恵を受けられるようClaude Codeを利用する
tk1351
2
590
Nuances on Kubernetes - RubyConf Taiwan 2025
envek
0
190
Claude Code と OpenAI o3 で メタデータ情報を作る
laket
0
140
STUNMESH-go: Wireguard NAT穿隧工具的源起與介紹
tjjh89017
0
380
オープンセミナー2025@広島「君はどこで動かすか?」アンケート結果
satoshi256kbyte
0
200
DockerからECSへ 〜 AWSの海に出る前に知っておきたいこと 〜
ota1022
5
1.8k
あのころの iPod を どうにか再生させたい
orumin
2
2.5k
🔨 小さなビルドシステムを作る
momeemt
1
370
UbieのAIパートナーを支えるコンテキストエンジニアリング実践
syucream
2
680
物語を動かす行動"量" #エンジニアニメ
konifar
14
5.4k
Constant integer division faster than compiler-generated code
herumi
2
690
Featured
See All Featured
Build The Right Thing And Hit Your Dates
maggiecrowley
37
2.8k
Reflections from 52 weeks, 52 projects
jeffersonlam
351
21k
Rebuilding a faster, lazier Slack
samanthasiow
83
9.1k
Learning to Love Humans: Emotional Interface Design
aarron
273
40k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
283
13k
Building Better People: How to give real-time feedback that sticks.
wjessup
367
19k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
248
1.3M
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
9
780
Statistics for Hackers
jakevdp
799
220k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
1.4k
Gamification - CAS2011
davidbonilla
81
5.4k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
7
820
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 }Ͱ ఆٛ͢Δ͔͠ͳ͍ͷ͕ඍົʹਏ͍