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
590
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
94
Swiftコードバトル必勝法
toshi0383
1
200
Sheets API使ってみた
toshi0383
2
250
visionOSについてGlobeeが取り組んでいること
toshi0383
0
420
agile20150512-150512055145-lva1-app6892.pdf
toshi0383
0
120
たのしいAirPlay
toshi0383
1
650
Profiling using Signpost
toshi0383
2
870
AVPlayer周りの設計tips
toshi0383
6
810
cmdshelf::from("Swift")
toshi0383
3
830
Other Decks in Programming
See All in Programming
Tuning GraphQL on Rails
pyama86
2
1k
Progressive Web Apps für Desktop und Mobile mit Angular (Hands-on)
christianliebel
PRO
0
110
外部システム連携先が10を超えるシステムでのアーキテクチャ設計・実装事例
kiwasaki
1
230
GitHub Actionsのキャッシュと手を挙げることの大切さとそれに必要なこと
satoshi256kbyte
5
390
Snowflake x dbtで作るセキュアでアジャイルなデータ基盤
tsoshiro
2
430
JaSST 24 九州:ワークショップ(は除く)実践!マインドマップを活用したソフトウェアテスト+活用事例
satohiroyuki
0
260
推し活としてのrails new/oshikatsu_ha_iizo
sakahukamaki
3
1.7k
のびしろを広げる巻き込まれ力:偶然を活かすキャリアの作り方/oso2024
takahashiikki
1
410
CSC305 Lecture 13
javiergs
PRO
0
130
go.mod、DockerfileやCI設定に分散しがちなGoのバージョンをまとめて管理する / Go Connect #3
arthur1
10
2.4k
Piniaの現状と今後
waka292
5
1.5k
WEBエンジニア向けAI活用入門
sutetotanuki
0
300
Featured
See All Featured
Optimising Largest Contentful Paint
csswizardry
33
2.9k
We Have a Design System, Now What?
morganepeng
50
7.2k
For a Future-Friendly Web
brad_frost
175
9.4k
Mobile First: as difficult as doing things right
swwweet
222
8.9k
Building an army of robots
kneath
302
42k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
26
1.4k
A designer walks into a library…
pauljervisheath
202
24k
How To Stay Up To Date on Web Technology
chriscoyier
788
250k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
3
370
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
27
790
Into the Great Unknown - MozCon
thekraken
31
1.5k
Practical Orchestrator
shlominoach
186
10k
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