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
ユーザインターフェイスと非同期処理
Search
cockscomb
May 15, 2018
Programming
5
1.8k
ユーザインターフェイスと非同期処理
Presented at Bonfire iOS #4
cockscomb
May 15, 2018
Tweet
Share
More Decks by cockscomb
See All by cockscomb
jq at the Shortcuts
cockscomb
1
1.7k
GraphQL放談
cockscomb
4
1.9k
GraphQL Highway
cockscomb
28
8.2k
吉田を支える技術
cockscomb
0
2.2k
コーポレートサイトを静的化してAmplify Consoleにデプロイする
cockscomb
0
3.3k
GUIアプリケーションの構造と設計
cockscomb
10
10k
イカリング2におけるシングルページアプリケーション
cockscomb
2
7.4k
あなたの知らない UIKit の世界 — UITableView に UITextView を置きたい
cockscomb
1
7.3k
iOSアプリエンジニアのためのAndroidアプリ開発
cockscomb
7
1.9k
Other Decks in Programming
See All in Programming
rails statsで大解剖 🔍 “B/43流” のRailsの育て方を歴史とともに振り返ります
shoheimitani
2
930
今年一番支援させていただいたのは認証系サービスでした
satoshi256kbyte
1
250
menu基盤チームによるGoogle Cloudの活用事例~Application Integration, Cloud Tasks編~
yoshifumi_ishikura
0
110
命名をリントする
chiroruxx
1
390
Zoneless Testing
rainerhahnekamp
0
120
MCP with Cloudflare Workers
yusukebe
2
220
htmxって知っていますか?次世代のHTML
hiro_ghap1
0
330
Асинхронность неизбежна: как мы проектировали сервис уведомлений
lamodatech
0
700
testcontainers のススメ
sgash708
1
120
Scalaから始めるOpenFeature入門 / Scalaわいわい勉強会 #4
arthur1
1
300
HTTP compression in PHP and Symfony apps
dunglas
2
1.7k
アクターシステムに頼らずEvent Sourcingする方法について
j5ik2o
4
210
Featured
See All Featured
The Power of CSS Pseudo Elements
geoffreycrofte
73
5.4k
Why Our Code Smells
bkeepers
PRO
335
57k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
44
6.9k
[RailsConf 2023] Rails as a piece of cake
palkan
53
5k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
8
1.2k
Rails Girls Zürich Keynote
gr2m
94
13k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
38
1.9k
Intergalactic Javascript Robots from Outer Space
tanoku
270
27k
It's Worth the Effort
3n
183
28k
Gamification - CAS2011
davidbonilla
80
5.1k
Scaling GitHub
holman
458
140k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
2
170
Transcript
ϢʔβΠϯλʔϑΣΠεͱ ඇಉظॲཧ
id:cockscomb Ճ౻ਘथ גࣜձࣾͯͳ γχΞΞϓϦέʔγϣϯΤϯδχΞ
ࡢࠓ w (PPHMF*0Ͳ͏Ͱ͔ͨ͠ʁ w 88%$͕͍͖ۙͮͯ·ͨ͠Ͷ w ͳʹ͕ൃද͞ΕΔָ͔͠ΈͰ͢Ͷ w Έͳ͞ΜͲΜͳظΛ͍࣋ͬͯ·͔͢ʁ w
88%$Ͳ͏Ͱ͚ͨͬ͠
J04 w "3,JU$PSF.- w 6*,JU w %SBHBOE%SPQ w 'JMFT
J04ͷ֓ཁ Ӭٱ "3,JU అमҰ $PSF.-
٢ా༔Ұ 4XJGUͷ৽ػೳͱΞοϓσʔτ ాᠳ 9DPEFͷ৽ػೳ ࡔాߊҰ %SBHBOE%SPQ Ճ౻ਘथ 'JMFTͱ%PDVNFOU#BTFE"QQMJDBUJPO Ճ౻ਘथ 6*,JUͷΨΠυϥΠϯͷมߋͱ "VUP-BZPVUͷ৽ػೳɺΞοϓσʔτᬒ༤հ $PSF/'$ ؛ࠀݾ 1%',JU ؛ࠀݾ 4JSJ,JU ؛ࠀݾ )PNF,JUೖͱJ04ʹ͓͚Δ৽ػೳ ॴ༑ଠ .FUBM అमҰ "VEJP.FEJBؔ࿈ ৽ϑϨʔϜϫʔΫͱΞοϓσʔτ Ӭٱ
63-4FTTJPO5BTL open class URLSessionTask : NSObject, NSCopying, ProgressReporting { @available(iOS
11.0, *) open var progress: Progress { get } }
public protocol ProgressReporting : NSObjectProtocol { public var progress: Progress
{ get } }
%SBHBOE%SPQ open class NSItemProvider : NSObject, NSCopying { @available(iOS 11.0,
*) open func registerDataRepresentation(forTypeIdentifier typeIdentifier: String, visibility: NSItemProviderRepresentationVisibility, loadHandler: @escaping ((Data?, Error?) -> Swift.Void) -> Progress?) }
None
1SPHSFTT3FQPSUJOH w ඇಉظॲཧͷঢ়گΛϢʔβΠϯλʔϑΣΠεʹөͰ͖Δ w "DUJWJUZ*OEJDBUPS1SPHSFTT#BSΛදࣔ͢ΔͱΑ͍ w l)VNBO*OUFSGBDF(VJEFMJOFTr1SPHSFTT*OEJDBUPSTzΑΓ w ݱࡏͷ3Y4XJGUͰѻ͏ͷ͍͠
<2>ͳͥඇಉظʹ͢Δͷʁ
None
<2>ͳͥඇಉظʹ͢Δͷʁ ϝΠϯεϨουͷ3VO-PPQΛࢭΊͨ͘ͳ͍͔Β ࢭΊͯ͠·͏ͱΧΫΧΫ͢Δ
<2>ΈΜͳͲ͏ͯ͠Δʁ
3FBDUlTVTQFOTFz const movieDetailsFetcher = createFetcher( fetchMovieDetails ) const MovieDetails: React.SFC<MovieDetailsProps>
= ({id}) => { const movie = movieDetailsFetcher.read(id) return ( <div className="MovieDetails"> <MoviePoster src={movie.poster} /> <h1>{movie.title}</h1> <MovieMetrics {...movie} /> </div> ) }
'MVUUFS w 3FBDUʹΠϯεύΠΞ w %BSUΛ͏
Future<AtomFeed> fetchAtom(String atomUrl) async { var atomXml = await http.read(atomUrl);
return parse(atomXml); } class Feed extends StatelessWidget { final String url; const Feed({Key key, this.url}) : super(key: key); @override Widget build(BuildContext context) { var entries = new FutureBuilder<AtomFeed>( future: fetchAtom(url), builder: (context, snapshot) { if (snapshot.hasData) { var feed = snapshot.data; return new Entries(feed: feed); } else if (snapshot.hasError) { return new Text("${snapshot.error}"); } return new CircularProgressIndicator(); }); return new Scaffold( appBar: new AppBar(title: new Text("Feed")), body: entries, ); } }
w એݴతͳ6*ϑϨʔϜϫʔΫ͕ྲྀߦ w 3FBDU 'MVUUFS w ඇಉظॲཧΛѻ͍͘͢͢ΔΈ w 3FBDUͷTVTQFOTF w
'MVUUFSͷ'VUVSF#VJMEFS w .BS[JQBOͲ͏ͳΔʁ
.BS[JQBO w Ͳ͏͍͏ͷ͔ w 6*,JUͷҠ২ʁ w ৽͍͠6*ϑϨʔϜϫʔΫʁ w 4XJGUͱͷੑ w
ͦͦൃද͞ΕΔͷ͔