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
880
生体データを取り扱うアプリ開発の勘所
nerd0geek1
1
85
動線改善とステータス可視化で家庭内のストレスを軽減した話
nerd0geek1
3
4.1k
家庭をプロジェクトとして運営した話
nerd0geek1
2
4.1k
fastlaneの勉強会を主催して学んだこと、得たこと、悩んだこと
nerd0geek1
1
990
みんなで育てるprecheck
nerd0geek1
1
680
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
Jakarta EE meets AI
ivargrimstad
0
540
イベント駆動で成長して委員会
happymana
1
320
Figma Dev Modeで変わる!Flutterの開発体験
watanave
0
110
광고 소재 심사 과정에 AI를 도입하여 광고 서비스 생산성 향상시키기
kakao
PRO
0
170
レガシーシステムにどう立ち向かうか 複雑さと理想と現実/vs-legacy
suzukihoge
14
2.2k
Streams APIとTCPフロー制御 / Web Streams API and TCP flow control
tasshi
2
350
EventSourcingの理想と現実
wenas
6
2.3k
Quine, Polyglot, 良いコード
qnighy
4
640
TypeScript Graph でコードレビューの心理的障壁を乗り越える
ysk8hori
2
1.1k
NSOutlineView何もわからん:( 前編 / I Don't Understand About NSOutlineView :( Pt. 1
usagimaru
0
330
WebフロントエンドにおけるGraphQL(あるいはバックエンドのAPI)との向き合い方 / #241106_plk_frontend
izumin5210
4
1.4k
TypeScriptでライブラリとの依存を限定的にする方法
tutinoko
2
670
Featured
See All Featured
5 minutes of I Can Smell Your CMS
philhawksworth
202
19k
10 Git Anti Patterns You Should be Aware of
lemiorhan
654
59k
Building Your Own Lightsaber
phodgson
103
6.1k
Measuring & Analyzing Core Web Vitals
bluesmoon
4
120
Fantastic passwords and where to find them - at NoRuKo
philnash
50
2.9k
How STYLIGHT went responsive
nonsquared
95
5.2k
How to train your dragon (web standard)
notwaldorf
88
5.7k
Building an army of robots
kneath
302
43k
Optimizing for Happiness
mojombo
376
70k
Java REST API Framework Comparison - PWX 2021
mraible
PRO
28
8.2k
KATA
mclloyd
29
14k
The Pragmatic Product Professional
lauravandoore
31
6.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)