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.3k
吉田を支える技術
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.4k
iOSアプリエンジニアのためのAndroidアプリ開発
cockscomb
7
1.9k
Other Decks in Programming
See All in Programming
KMP와 kotlinx.rpc로 서버와 클라이언트 동기화
kwakeuijin
0
290
AWS re:Invent 2024個人的まとめ
satoshi256kbyte
0
100
CQRS+ES の力を使って効果を感じる / Feel the effects of using the power of CQRS+ES
seike460
PRO
0
240
アクターシステムに頼らずEvent Sourcingする方法について
j5ik2o
6
700
Package Traits
ikesyo
1
200
Findy Team+ Awardを受賞したかった!ベストプラクティス応募内容をふりかえり、開発生産性向上もふりかえる / Findy Team Plus Award BestPractice and DPE Retrospective 2024
honyanya
0
140
PHPで学ぶプログラミングの教訓 / Lessons in Programming Learned through PHP
nrslib
4
1.1k
선언형 UI에서의 상태관리
l2hyunwoo
0
270
DevFest - Serverless 101 with Google Cloud Functions
tunmise
0
140
rails newと同時に型を書く
aki19035vc
5
710
QA環境で誰でも自由自在に現在時刻を操って検証できるようにした話
kalibora
1
140
Rubyでつくるパケットキャプチャツール
ydah
0
160
Featured
See All Featured
Building a Scalable Design System with Sketch
lauravandoore
460
33k
The Cult of Friendly URLs
andyhume
78
6.1k
Large-scale JavaScript Application Architecture
addyosmani
510
110k
Six Lessons from altMBA
skipperchong
27
3.6k
Fireside Chat
paigeccino
34
3.1k
GraphQLとの向き合い方2022年版
quramy
44
13k
A Tale of Four Properties
chriscoyier
157
23k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
47
5.1k
Fontdeck: Realign not Redesign
paulrobertlloyd
82
5.3k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
38
1.9k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
173
51k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
3.6k
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
ͦͦൃද͞ΕΔͷ͔