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
tvOSのリスト系のインデックスラベルを自作してみる
Search
toshi0383
November 20, 2017
Programming
0
600
tvOSのリスト系のインデックスラベルを自作してみる
Swift愛好会 vol24での発表資料です。
https://love-swift.connpass.com/event/67581
toshi0383
November 20, 2017
Tweet
Share
More Decks by toshi0383
See All by toshi0383
CoreDataはじめました
toshi0383
0
100
Swiftコードバトル必勝法
toshi0383
1
220
Sheets API使ってみた
toshi0383
2
270
visionOSについてGlobeeが取り組んでいること
toshi0383
0
440
agile20150512-150512055145-lva1-app6892.pdf
toshi0383
0
140
たのしいAirPlay
toshi0383
1
670
Profiling using Signpost
toshi0383
2
880
AVPlayer周りの設計tips
toshi0383
6
820
cmdshelf::from("Swift")
toshi0383
3
840
Other Decks in Programming
See All in Programming
StarlingMonkeyを触ってみた話 - 2024冬
syumai
3
270
Effective Signals in Angular 19+: Rules and Helpers @ngbe2024
manfredsteyer
PRO
0
130
たのしいparse.y
ydah
3
120
開発者とQAの越境で自動テストが増える開発プロセスを実現する
92thunder
1
180
ブラウザ単体でmp4書き出すまで - muddy-web - 2024-12
yue4u
2
460
fs2-io を試してたらバグを見つけて直した話
chencmd
0
230
Keeping it Ruby: Why Your Product Needs a Ruby SDK - RubyWorld 2024
envek
0
180
LLM Supervised Fine-tuningの理論と実践
datanalyticslabo
3
1.1k
CSC305 Lecture 25
javiergs
PRO
0
130
CSC509 Lecture 14
javiergs
PRO
0
140
アクターシステムに頼らずEvent Sourcingする方法について
j5ik2o
4
230
創造的活動から切り拓く新たなキャリア 好きから始めてみる夜勤オペレーターからSREへの転身
yjszk
1
130
Featured
See All Featured
Why Our Code Smells
bkeepers
PRO
335
57k
Scaling GitHub
holman
458
140k
Facilitating Awesome Meetings
lara
50
6.1k
Rebuilding a faster, lazier Slack
samanthasiow
79
8.7k
Reflections from 52 weeks, 52 projects
jeffersonlam
347
20k
Embracing the Ebb and Flow
colly
84
4.5k
Docker and Python
trallard
42
3.1k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.3k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
169
50k
Building Applications with DynamoDB
mza
91
6.1k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
32
2.7k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
95
17k
Transcript
tvOSͷϦετܥͷΠϯ σοΫεϥϕϧΛࣗ࡞ͯ͠ ΈΔ Swi!Ѫձ vol24 Nov 20, 2017 Toshihiro Suzuki
© Toshihiro Suzuki 2017 1
whoami — ླ ढ़༟ (@toshi0383) — ձࣾͰͱͬ͠ʔ͞Μ — iOS/tvOS dev
at AbemaTV — GT SPORTS, F1 ! © Toshihiro Suzuki 2017 2
Latest News © Toshihiro Suzuki 2017 3
tools and apps © Toshihiro Suzuki 2017 4
tvOSͷAccelerated Scrollʹ͍ͭͯ͠·͢ © Toshihiro Suzuki 2017 5
Accelerated Scroll (ߴεΫϩʔϧ) tvOS10.2͔ΒՃ εΫϩʔϧ͕ॎʹ͍߹ʹɺ — ಉ͡ํʹԿεϫΠϓ — λοναʔϑΣεӈΛ্ԼʹεϫΠϓ ͷ͍ͣΕ͔ͰൃՐɻ
ඪ४Ͱ༗ޮʹͳ͍ͬͯͯɺແޮʹͰ͖ͳ͍ɻ © Toshihiro Suzuki 2017 6
Accelerated Scroll © Toshihiro Suzuki 2017 7
ϦετܥͷΠϯσοΫεϥϕϧ UITableView/UICollectionViewͰϥϕϧΛઃ ఆՄೳ delegateͰϥϕϧͱͦΕʹରԠ͢ΔIndexPath Λฦ͢ɻ © Toshihiro Suzuki 2017 8
ϥϕϧʹରԠ͢Δ IndexPathʹҰؾʹδϟ ϯϓͰ͖ͯͱͯศར © Toshihiro Suzuki 2017 9
ͦͷࠒAbemaTVͷ൪ද.. ͷมߋͷͨΊʹ࠶ੜϘλϯΛΘ͍ͤͯ Δɻ © Toshihiro Suzuki 2017 10
՝ ຊདྷͰ͋Ε࠶ੜϘλϯ൪ද͔Βͷ࠶ ੜʹׂΓ͍ͯͨͱ͜Ζ ΠϯσοΫεϥϕϧʹมߋͷػೳΛͤΕ ɺ࠶ੜΛղ์Ͱ͖ͦ͏ɻ © Toshihiro Suzuki 2017 11
࣮ࡍʹdelegateΛ࣮͠ ͯΈͨ © Toshihiro Suzuki 2017 12
© Toshihiro Suzuki 2017 13
— ϑΥϯτഎܠ৭ɺදࣔҐஔΛࢦఆͰ͖ͳ͍ — ͔ͿͬͯͱͯݟͮΒ͍ — ֯5จࣈ͘Β͍͕ݶͰɺͦΕҎ্ͩͱ truncate͞Εͨ ! ©
Toshihiro Suzuki 2017 14
Ͳ͏ͨ͠Β͍͍ͷ͔ © Toshihiro Suzuki 2017 15
ղܾࡦͦͷ1: ඇදࣔʹ͢Δ ߴεΫϩʔϧແޮʹͰ͖ͳ͍͕ɺΠϯσο ΫεΛඇදࣔʹ͢Δ͜ͱͰ͖Δɻ if #available(tvOS 10.2, *) { collectionView.indexDisplayMode
= .alwaysHidden } ͪΖΜ൪දͷέʔεͰ͜Εͩͱ࠶ੜϘλ ϯׂΓͯͷղܾʹͳ͍ͬͯͳ͍ɻ © Toshihiro Suzuki 2017 16
ղܾࡦͦͷ2: ࣗ࡞͢Δ — ӈͷεϫΠϓΛݕ͢Δ — ΠϯσοΫεΛεΫϩʔϧ͍ͯ͠Δؒεϫ ΠϓʹεΫϩʔϧ͕Ԡ͢Δ — ӈΛ্Լʹυϥοά͍ͯ͠ΔؒɺεΫ ϩʔϧ͕Ճͯ͠Ұؾʹδϟϯϓ͢Δ
— ΠϯσοΫεͷදࣔ/ඇදࣔएׯlazyʹԠ ͢Δ © Toshihiro Suzuki 2017 17
݁ߏྑ͘Ͱ͖ͯΔ ! © Toshihiro Suzuki 2017 18
ͪΐͬͱ͚ͩؤுͬͯΈͨ © Toshihiro Suzuki 2017 19
࣮ ৄ͘͠ɺGitHubʹ্͛ͯ͋ΔαϯϓϧΛ͝ཡ ͍ͩ͘͞ɻ(ਵ࣌ߋ৽தɻɻ https://github.com/toshi0383/GestureTV © Toshihiro Suzuki 2017 20
ӈͷ্ԼεϫΠϓͲ͏ ͬͯऔಘ͢Δͷʁ © Toshihiro Suzuki 2017 21
tvOS Advent CalendarͰެ։༧ఆʂ ॻ͍ͯ͘ΕΔਓืूத https://qiita.com/advent-calendar/2017/tvos © Toshihiro Suzuki 2017 22
·ͱΊ — tvOSͷϦετܥͷΠϯσοΫεϥϕϧΛࣗ࡞ ͯ͠Έ·ͨ͠ɻ — Πϕϯτ͑͞औΕΕɺ͋ͱͳΜͱ͔ͳΓ ͦ͏ɻ — ͜ΕͰগ͠൪ද͕͍͘͢ͳΔ..ʁ —
Advent CalendarΛ্ཱͪ͛ͳ͔ͬͨΒ͜͜ ·Ͱ͍ͬͯͳ͔͔ͬͨ © Toshihiro Suzuki 2017 23
We're hiring © Toshihiro Suzuki 2017 24