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
CDEvents+ReactiveCocoa でファイル監視
Search
Tomoki Aonuma
October 18, 2014
Programming
950
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
CDEvents+ReactiveCocoa でファイル監視
Tomoki Aonuma
October 18, 2014
More Decks by Tomoki Aonuma
See All by Tomoki Aonuma
Git ライフを快適にする知られざるコマンドたち
uasi
48
10k
Other Decks in Programming
See All in Programming
わからない話を追いかけたら、プログラミング言語を作る側にいた
ydah
3
560
Introducing Stack Pull Request in GitHub
kkamegawa
0
110
komatsuna「分散システムにおけるバグ分析手法」
komatsunaqa
0
290
Go 1.27 における memory allocation の高速化
andpad
0
350
関東Kaggler会_NVIDIA_Nemotron_コンペ_振り返り
rick_ds
0
730
レビュー履歴をAIに食わせて、 Compose移行を加速するs
shihochan
0
240
Go 1.27からのGODEBUG / Go 1.27 リリースパーティ #go127party
mazrean
0
260
<title><a id="</title>君はこのHTMLをパースできるか"></a></title> #雑LT_study
pizzacat83
0
180
go-spidermonkeyでAIエージェントのCode Modeを実装する
syumai
3
1.3k
承認済みなのに差戻しできてしまうバグ、型で潰せます
shinchit
0
120
楽しそうなつよつよエンジニアと目が死んでる僕/A brilliant engineer having a blast, and dead-eyed me.
3l4l5
2
260
AIの中の人になってみる
htkym
0
140
Featured
See All Featured
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2.4k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.8k
Bash Introduction
62gerente
615
220k
HTML-Aware ERB: The Path to Reactive Rendering @ RubyCon 2026, Rimini, Italy
marcoroth
4
500
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
128
56k
Between Models and Reality
mayunak
4
410
Automating Front-end Workflow
addyosmani
1369
210k
A Soul's Torment
seathinner
6
3.5k
Ten Tips & Tricks for a 🌱 transition
stuffmc
0
180
Visualization
eitanlees
152
17k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3.3k
The agentic SEO stack - context over prompts
schlessera
0
880
Transcript
$%&WFOUT 3FBDUJWF$PDPB ͰϑΝΠϧࢹ 3FBDUJWF$PDPB5PLZP !VBTJ
ࣗݾհ!VBTJ *ODSFNFOUTגࣜձࣾ ੨পथ
w,PCJUPͰϑΝΠϧࢹ wΧελϜ$44 w%#ಉظ
'4&WFOUT"1*
FSEventStreamRef FSEventStreamCreate( CFAllocatorRef allocator, FSEventStreamCallback callback, FSEventStreamContext *context, CFArrayRef pathsToWatch,
FSEventStreamEventId sinceWhen, CFTimeInterval latency, FSEventStreamCreateFlags flags); $"1* UPPMPXMFWFM
$%&WFOUT /rastersize/CDEvents
self.events = [[CDEvents alloc] initWithURLs:URLs block:^(CDEvents *watcher, CDEvent *event) {
doSomething(); }];
$%&WFOUT 3"$&YUFOTJPOT git.io/-G5IKg
self.signal = [CDEvents rac_signalForEventsWithURLs: URLs]; [self.signal subscribeNext:^(RACTuple *t) { RACTupleUnpack(
CDEvents *watcher, CDEvent *event) = t; doSomething(); }];
self.events = [[CDEvents alloc] initWithURLs:URLs block:^(CDEvents *watcher, CDEvent *event) {
doSomething(); }]; ʢ࠶ܝʣ
w͘ͳͬͯΔ͚Ͳʜ wpMUFS wUISPUUMF w͑ͯศརʂʂʂ
+ rac_signalFor... { ... objc_setAssociatedObject( signal, // ←γάφϧ͕ _cmd, watcher,
// ←͍ͭ͜Λอ࣋ OBJC_ASSOCIATION_RETAIN); $%&WFOUTͷ Πϯελϯεʁ
MJCFYUPCKDͷ /jspahrsummers/libextobjc
!XFBLJGZ !TUSPOHJGZ
- (void)foo { @weakify(self); self.prop = ^{ @strongify(self); self =
...; } }
!PO&YJU\^
- (void)foo { @onExit { NSLog(@"3"); }; { @onExit {
NSLog(@"1"); }; } NSLog(@"2"); }
!DPODSFUFQSPUPDPM
@protocol NoDragDrop <NSObject>; @concrete - (NSUInteger)webView:...; @end ! @concreteprotocol(NoDragDrop) -
(NSUInteger)webView:... {...} @end ! @interface MyViewController () <NoDragDrop>; @end
Ά͍ͷΛ࡞ͬͨ
!PO%FBMMPD\^ !PO%FBMMPD0G0CKFDU \^ git.io/Yuip2Q
- (void)foo { @onDealloc { doSomething(); }; @onDeallocOfObject(bar) { doSomething();
}; }
- (void)foo { @onDealloc { doSomething(); }; }
- (void)foo { RACDisposable *disposable = [RACObserve()...]; @onDealloc { [disposable
dispose]; }; }
5IBOLZPV