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でライブラリを書いて学んだこと
Search
Kohei Tabata
August 17, 2016
Programming
0
370
Swiftでライブラリを書いて学んだこと
Kohei Tabata
August 17, 2016
Tweet
Share
More Decks by Kohei Tabata
See All by Kohei Tabata
営業活動なしで継続的に案件を受注する方法 / how to get a contract without sales as a freelance
nerd0geek1
2
890
生体データを取り扱うアプリ開発の勘所
nerd0geek1
1
87
動線改善とステータス可視化で家庭内のストレスを軽減した話
nerd0geek1
3
4.1k
家庭をプロジェクトとして運営した話
nerd0geek1
2
4.1k
fastlaneの勉強会を主催して学んだこと、得たこと、悩んだこと
nerd0geek1
1
1k
みんなで育てるprecheck
nerd0geek1
1
690
matchとは?match導入のメリット
nerd0geek1
4
540
Improve your workflow with Sketch plugin
nerd0geek1
3
1.3k
Looking back try! Swift 2017
nerd0geek1
0
570
Other Decks in Programming
See All in Programming
CQRS+ES の力を使って効果を感じる / Feel the effects of using the power of CQRS+ES
seike460
PRO
0
120
rails statsで大解剖 🔍 “B/43流” のRailsの育て方を歴史とともに振り返ります
shoheimitani
2
930
KMP와 kotlinx.rpc로 서버와 클라이언트 동기화
kwakeuijin
0
140
CSC305 Lecture 26
javiergs
PRO
0
140
ブラウザ単体でmp4書き出すまで - muddy-web - 2024-12
yue4u
2
460
Go の GC の不得意な部分を克服したい
taiyow
2
770
선언형 UI에서의 상태관리
l2hyunwoo
0
150
複雑な仕様に立ち向かうアーキテクチャ
myohei
0
170
SymfonyCon Vienna 2025: Twig, still relevant in 2025?
fabpot
3
1.2k
【re:Growth 2024】 Aurora DSQL をちゃんと話します!
maroon1st
0
770
良いユニットテストを書こう
mototakatsu
5
2k
Zoneless Testing
rainerhahnekamp
0
120
Featured
See All Featured
The Cost Of JavaScript in 2023
addyosmani
45
7k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
507
140k
Adopting Sorbet at Scale
ufuk
73
9.1k
Stop Working from a Prison Cell
hatefulcrawdad
267
20k
Making Projects Easy
brettharned
116
5.9k
Bash Introduction
62gerente
608
210k
Building a Modern Day E-commerce SEO Strategy
aleyda
38
7k
Making the Leap to Tech Lead
cromwellryan
133
9k
Statistics for Hackers
jakevdp
796
220k
Code Reviewing Like a Champion
maltzj
520
39k
Optimizing for Happiness
mojombo
376
70k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
44
9.3k
Transcript
SwiftͰϥΠϒϥϦΛ ॻֶ͍ͯΜͩ͜ͱ 2016/08/17 Kyobashi.swift @גࣜձࣾϦΫϧʔτϚʔέςΟϯάύʔτφʔζ
ࣗݾհ ɾKohei Tabata(@nerd0geek1) ɾSaib Studio LLC ɾiOS/MacOS/tvOS Developer ɾFastlaneେ͖ ɾݴޠ༷ϥΠϒϥϦఏڙΑΓɺαʔϏεఏڙͷڵຯڧ͍
Said Studio LLC Kohei Tabata Next! Remote quick-zip plus Sleeple
ϥΠϒϥϦॻ͍ͯ·͔͢ʁ
࣍ ɾͳͥϥΠϒϥϦΛॻ͘ͷ͔ʁ ɾϥΠϒϥϦΛॻ͘ϝϦοτ ɾϥΠϒϥϦΛॻ͘σϝϦοτ ɾ·ͱΊ
ͳͥϥΠϒϥϦΛॻ͘ͷ͔ʁ
ΠϯηϯςΟϒͷͨΊʁ
None
ٕज़తؔ৺ͷͨΊʁ
None
ϓϨθϯε্ͷͨΊʁ
None
ָ͍͔ͨ͠Βɻ
ͳͥϥΠϒϥϦΛॻ͘ͷ͔ʁ ɾଞ༷ࣾͰΞϓϦ։ൃͷ͓ख͍ͭͭ͠ɺࣗࣾαʔϏεΛ։ൃ͠ɺݸਓΞϓϦ։ൃ͍ͯ͠Δɻ ɾࠓɺࣗࣾΞϓϦ2ͭ(iOSɺMac)ɺݸਓΞϓϦ1ͭӡ༻ͭͭ͠ɺݸਓΞϓϦ2ͭ։ൃத ɾ1ճղܾͨ͠ΛɺϓϩδΣΫτ͝ͱʹԿճղܾ͢Δͱ͔ͬͯΒΕͳ͍ ɾࣅͨΑ͏ͳίʔυͱɺϓϩδΣΫτ͝ͱͷςετίʔυͱ͔ ɾࣗͷؔΘΔϓϩδΣΫτͰָΛ͢ΔͨΊʹɺԿ࣮͢ΔΑ͏ͳ൚༻తͳػೳΛϥΠϒϥϦԽ
࡞ͬͨϥΠϒϥϦ ɾnerd0geek1/NSPageControl ɹ֓ཁɿUIPageControlͷMacOS(AppKit)൛ɻ ɹಈػɿMacOSͰUIPageControlʹ૬͢ΔUIίϯϙʔωϯτ͕ଘࡏ͠ͳ͔ͬͨͨΊɻ ɾnerd0geek1/Logger ɹ֓ཁɿϩάͷΧελϚΠζ(ΧϥʔϦϯάɺΫϥεɺߦ൪߸ɺϝιου) ɹಈػɿॻ͖͢ͷ͕໘ͩͬͨͨΊɻ ɾnerd0geek1/PausableTimer ɹ֓ཁɿετοϓΥονػೳ(։࢝ /
Ұ࣌ఀࢭ / ࠶։ɺΓ࣌ؒɺ࡞ಈத͔) ɹಈػɿϓϥΠϕʔτͱࣗࣾϓϩδΣΫτͰಉ͡ػೳΛ࣮͢Δͷ͕໘ͩͬͨͨΊɻ ɹɹɹɹݸਓϓϩδΣΫτ͔ΒΓग़ͯ͠ϥΠϒϥϦԽɻ ɾnerd0geek1/PlayListPlayer ɹ֓ཁɿAVPlayerͷϥούʔ(AVQueuePlayerͱҧ͍ɺPlayListมΘΒͳ͍) ɹಈػɿAVFoundationपΓɺ࠶࣮͕໘ɻ׳Εͯͳ͍ਓ͕࣮͢Δͱόά͕ຒΊࠐ·Ε͍͢ɻ
NSPageControl ɾNSPageControl(MacOSͰUIPageControlͷUIΛ࣮ݱ͢ΔͨΊͷϥΠϒϥϦ)
PlayListPlayer
ϥΠϒϥϦΛॻ͘ϝϦοτ ɾΕΔ΄ͲָʹͳΔ ɾઃܭྗ্͕͠ɺΩϨΠͳઃܭΛ৺͕͚ΔΑ͏ʹɻ ɾ͕ࣗಇ͔ͳͯ͘ɺࣗͱಉ͡ΫΦϦςΟͰػೳΛఏڙ͘͢͠ͳΔɻ ɾϏϧυʹؔ͢Δ͕ࣝਂ·Δ ɾࣗͷεΩϧ͕Ͳͷఔ͔ɺਓʹΘ͔ͬͯΒ͍͍͢ɻ ɾ(ࣗͷ߹ɺ͔ͳΓ෭࣍తͳҐஔ͚͚ͮͩͲ)ਓͷखॿ͚ɻ
ΕΔ΄ͲָʹͳΔ ɾTableViewΛMVVMΞʔΩςΫνϟͰ࣮͢Δ ɹͨΊͷϥΠϒϥϦ ɾॳσʔλΛಉظతʹऔಘ͠ɺબಉ࣌ʹ ɹ1ྻͷΈબՄೳͳϢʔεέʔεΛఆ ɹ+ σʔλ͕ඇಉظʹऔಘ͞ΕΔέʔε ɹ+ ෳͷྻΛಉ࣌ʹબ͢Δέʔε →ࠓޙͷϓϩδΣΫτͰɺ্هશͯͷέʔεͰ
ɹ಄Λ͏ඞཁ͕ͳ͘ͳΔ ڧͯ͘χϡʔήʔϜঢ়ଶͰ ৽نϓϩδΣΫτʂ
ઃܭྗͷ্ ɾprotocolͰ֎෦ʹެ։͖͢ΠϯλʔϑΣΠεΛఆٛɹˠɹ࣮ & ςετ ɹˠ࣮ʹҾͬுΒΕΔͱ͍͏͜ͱ͕ͳ͘ͳͬͨʂ ɾpublicͱinternalͷ͍͚Λҙࣝɻ →
Ϗϧυʹؔ͢Δ͕ࣝਂ·Δ ɾϩΪϯάextensionͳͲɺϓϥοτϑΥʔϜʹґଘͤͣʹར༻Ͱ͖ΔػೳͷϞδϡʔϧԽΛߦ͏ ɹˠطଘͷϚϧνϓϥοτϑΥʔϜରԠ͍ͯ͠ΔϥΠϒϥϦ(Alamofire)ͷઃఆΛௐΔ ɹɹɾϓϩδΣΫτߏ ɹɹɾίϯύΠϧରϑΝΠϧͷઃఆ ɹɹɾϓϥοτϑΥʔϜͷࠩΛٵऩ͢ΔΫϥεͷ࡞Γํ ɹɹɾ.travis.ymlͷॻ͖ํ ɹɹɾetc…
ϥΠϒϥϦΛॻ͘σϝϦοτ ɾӡ༻͢Δඞཁ͋Γ ɾਐา͠ʹ͘͘ͳΔ ɾެ։࣌ʹ༻ҙ͢ΔϑΝΠϧ͕૿͑Δ߹͋Γ ɹ(ݸਓͰͷΈ͏߹CarthageରԠͷΈɺ ɹෳਓϓϩδΣΫτͰ͏߹podspecREADMEΛ༻ҙ) ɾ.podspecREADME.mdͱ͍ͬͨࣗͰ͙͢ʹ ɹར༻͠ͳ͍ͷΛॻ͘ͱ͖ͷΔؾɾੜ࢈ੑͷ͞ ɹˠςϯϓϨʔτԽɾδΣωϨʔλͰ؆қԽ
·ͱΊ ɾݸਓϥΠϒϥϦ࡞Γ࢝Ί͔ͯΒɺίʔυͷ࠶ར༻ઃܭྗͷ্Ͱɺࣄ͕͔ͳΓָʹɻ ɾϥΠϒϥϦͰҰ࣮ͨ͠ػೳͰ͋Εɺ୭Ͱ࣮Ͱ͖ΔΑ͏ʹͳΔͷͰɺ໘ന͍ࣄʹूதͰ͖Δ ɹΑ͏ʹʂ ɾେ͖ͳOSSΛಡΉ࿅शʹͳΔɻ ɾυΩϡϝϯτ࡞͕໘Ͱޮ͕མͪΔ͜ͱ͋Δ͕ɺ૯߹తʹϥΠϒϥϦΛ࡞Γଓ͚Δ΄͏͕ ɹ͔ͳΓಘɻ ੋඇɺࣗͷϥΠϒϥϦΛ ࡞ͬͯΈͯʁ
͝ਗ਼ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠ɻ
ࢀߟ ɾCyberAgent - GitHubελʔΠϯηϯςΟϒ ɹ(https://www.cyberagent.co.jp/techinfo_detail/id=10151) ɾQiita - SwiftͰίϚϯυϥΠϯπʔϧΛ࡞Δ ɹ(http://qiita.com/gin0606/items/e53853b121a669ddc738) ɾίϚϯυϥΠϯπʔϧʹ͍ͭͯௐͨ͜ͱ
ɹ(http://jpmartha.hatenablog.jp/entry/2016/02/14/215728) ɾGitHub - NSPageControl ɹ(https://github.com/nerd0geek1/NSPageControl) ɾGitHub - PlayListPlayer ɹ(https://github.com/nerd0geek1/PlayListPlayer)