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
View 系ライブラリに関する悩み
Search
USAMI Kosuke
March 30, 2016
Programming
0
870
View 系ライブラリに関する悩み
関西モバイルアプリ研究会 #12
http://kanmoba.connpass.com/event/28411/
USAMI Kosuke
March 30, 2016
Tweet
Share
More Decks by USAMI Kosuke
See All by USAMI Kosuke
Onsager代数とその周辺 / Onsager algebra tsudoi
usamik26
0
530
Apple HIG 正式名称クイズ結果発表 / HIG Quiz Result
usamik26
0
110
ゆめみ大技林製作委員会の立ち上げの話 / daigirin project
usamik26
0
280
@ViewLoadingプロパティラッパの紹介と自前で実装する方法 / @ViewLoading property wrapper implementation
usamik26
0
430
これからUICollectionViewを実践活用する人のためのガイド / Guide to UICollectionView
usamik26
1
690
Xcodeとの最近の付き合い方のはなし / Approach To Xcode
usamik26
2
610
UICollectionView Compositional Layout
usamik26
0
680
Coding Swift with Visual Studio Code and Docker
usamik26
0
450
Swift Extension for Visual Studio Code
usamik26
2
910
Other Decks in Programming
See All in Programming
最新TCAキャッチアップ
0si43
0
190
Arm移行タイムアタック
qnighy
0
330
Jakarta EE meets AI
ivargrimstad
0
210
[Do iOS '24] Ship your app on a Friday...and enjoy your weekend!
polpielladev
0
110
CSC509 Lecture 09
javiergs
PRO
0
140
카카오페이는 어떻게 수천만 결제를 처리할까? 우아한 결제 분산락 노하우
kakao
PRO
0
110
Remix on Hono on Cloudflare Workers
yusukebe
1
300
Quine, Polyglot, 良いコード
qnighy
4
650
3 Effective Rules for Using Signals in Angular
manfredsteyer
PRO
0
100
タクシーアプリ『GO』のリアルタイムデータ分析基盤における機械学習サービスの活用
mot_techtalk
4
1.4k
Compose 1.7のTextFieldはPOBox Plusで日本語変換できない
tomoya0x00
0
190
flutterkaigi_2024.pdf
kyoheig3
0
150
Featured
See All Featured
Become a Pro
speakerdeck
PRO
25
5k
Learning to Love Humans: Emotional Interface Design
aarron
273
40k
Designing the Hi-DPI Web
ddemaree
280
34k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
229
52k
A better future with KSS
kneath
238
17k
Adopting Sorbet at Scale
ufuk
73
9.1k
The Illustrated Children's Guide to Kubernetes
chrisshort
48
48k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
26
2.1k
Teambox: Starting and Learning
jrom
133
8.8k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
93
16k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
329
21k
Bash Introduction
62gerente
608
210k
Transcript
View ܥϥΠϒϥϦʹ ؔ͢ΔΈ USAMI Kosuke Fenrir Inc.
ҙ » ݁ͷͳ͍Ͱ͋Δ͜ͱΛ͓அΓ͓͖ͯ͠·͢ » جຊతʹ iOS Λલఏʹ͠·͢ͷͰྃ͝ঝ͍ͩ͘͞ʢOS ґଘ͠ͳ͍ ͋Γ·͚͢Ͳʣ
ϥΠϒϥϦͷͬ͘͟Γྨ » Model ܥʢLogic ܥʣ » View ܥʢUI ܥʣ »
ʢྨͮ͠Β͍ͷ͋Δ͚Ͳɺ͜͜Ͱؾʹ͠ͳ͍ʣ
Model ܥ » DI » Data Converter (JSON / XML
/ ...) » Database » Network
View ܥ » ඪ४ͷྨࣅͷಠࣗϥΠϒϥϦ » PagerViewController ෩ / Alert ෩
/ ... » ಠࣗύʔπʢ·ͨผͷ OS ෩ύʔπʣ » HUD / Drawer / PagerTabStrip / ...
ϥΠϒϥϦͷ༻ » Model ܥੵۃతʹ͏ » View ܥ͋·ΓΘͳ͍ » ʢHUD ͳͲΑ͘͏ͷ͋Δ͚Ͳʣ
View ܥ͋·ΓΘͳ͍ʁ » ࣗલ࣮͢ΔΑΓϥΠϒϥϦΛ͍͍ͨ߹͋Δ » ͔͠͠ɺ͍ͮΒ͞Λײ͡Δ͜ͱ͕͋Δ
͍ͮΒ͞ʁ » ϥΠϒϥϦ෦ͷݟͨͷௐ͕ͮ͠Β͍ » Ͳ͕͜ΧελϜͰ͖Δ͔ϥΠϒϥϦґଘ » ݟͨͷͩ͜ΘΓ͕ͳ͍ՕॴͳΒɾɾɾ » ϥΠϒϥϦͷڍಈͱࣗલ࣮෦ͷڍಈͱ͕߹͠ͳ͍ »
Delegate Gesture Recognizer ͕িಥ͢ΔͳͲ
݁ہ » ϥΠϒϥϦͦͷ··Ͱ͑ͳ͍߹͕ଟ͍ » ͦ͜Ͱɾɾɾ » ϥΠϒϥϦͷҰ෦Λվมͯ͠͏ » ΞϓϦͰࣗલ࣮͢Δ »
ϥΠϒϥϦΛࣗ࡞͢Δ » ͔ͤͬ͘ͷϥΠϒϥϦࢿ࢈͕׆͔ͤͯͳ͍ײɾɾɾ
࠷ۙͷࣄྫ
Pull to Refresh » ͍· iOS ΞϓϦͷҰൠతͳڍಈͱ͞ΕΔ » iOS ඪ४Ͱ
UIRefreshControl ͕͋Δ
͜͜ʹগʑحົͳཁٻ͕͋Δɾɾɾ » UITableView ͷ֎ଆʹ Refresh Control Λஔ͖͍ͨΜ͚ͩͲɾɾɾ » ʢී௨ UITableView
ͷଆʹஔ͖·͢ΑͶɾɾɾʣ
UIRefreshControl » ී௨ͷ UIView ʹ addSubView ͢Δͱྫ֎͕ൃੜ͢Δ » ઃܭऀͷҙਤͱҟͳΔͨΊɺΘ͟ͱྫ֎Λग़͍ͯ͠ΔΑ͏ͩ »
UIRefreshControl UITableViewController Ͱ͏ͷ
αʔυύʔςΟϥΠϒϥϦΛ୳͢ » Refresh Control ͷϥΠϒϥϦͨ͘͞Μ͋Δ » UIViewController + UITableView /
UIScrollView Ͱ͑Δ » ͔͠͠ɾɾɾ » ͲΕ Refresh Control Λ UIScrollView ʹ addSubView ͢Δ » ϨΠΞτΛϥΠϒϥϦ෦ͰܾΊ͍ͯΔ
ϥΠϒϥϦʹ੍͞ΕΔ » View ߏΛϥΠϒϥϦʹ੍͞ΕΔ » View Λࣗͷ͖ͳΑ͏ʹஔͰ͖ͳ͍ » ϨΠΞτΛࣗͷ͖ͳΑ͏ʹઃఆͰ͖ͳ͍ »
Refresh Control Λ֎ଆʹஔ͘͜ͱϩδοΫతʹՄೳͳͣ
View ܥϥΠϒϥϦʹΉ͜ͱ » View ͷ࣮ϨΠΞτͰ͖Δ͚ͩΞϓϦʹ·͔ͤͯ΄͍͠ » ϥΠϒϥϦج൫Λఏڙͯ͠΄͍͠
ଞͷ » Refresh Control ͷϥΠϒϥϦͷଞͷࣄྫ » UIScrollViewDelegate ͷ࣮ͷதͰ hogehoge ϝιουΛݺ
» Ͱతͷ delegate UITableViewDelegate Ͱ͋Δ » ͦͷϥΠϒϥϦͷཁٻʹ͋ΘͤΔͱ delegate Λࣗ༝ʹઃܭͰ͖ͳ͍
ΞϓϦͷઃܭͷӨڹΛݮΒ͢ » ϥΠϒϥϦͷཁٻʹҾͬுΒΕͯΞϓϦͷઃܭ੍͕͞ΕΔ » ϥΠϒϥϦͷதͰղܾͯ͠Β͑Δํ͕͍͍ » ࠓճͷࣄྫͩͱɺUIScrollView ͷϓϩύςΟΛ KVO Ͱࢹ
» ʢ༨ஊ͚ͩͲ KVO Γศརʣ
ͦΜͳΘ͚Ͱ » ϥΠϒϥϦΛ͏ͷΊͯࣗલ࣮ » ͦΕΛϥΠϒϥϦԽ͍ͨ͠ » ࡞தɾɾɾ