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
940
1
Share
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
mruby on C#: From VM Implementation to Game Scripting (RubyKaigi 2026)
hadashia
2
1.8k
From Formal Specification to Property Based Test
ohbarye
0
2.6k
ソースコード→AST→オペコード、の旅を覗いてみる
o0h
PRO
1
130
ソフトウェア設計の結合バランス #phperkaigi
kajitack
0
510
AI Agent と正しく分析するための環境作り
yoshyum
2
490
継続的な負荷検証を目指して
pyama86
3
1.2k
Import assertionsが消えた日~ECMAScriptの仕様はどう決まり、なぜ覆るのか~
bicstone
2
180
20260514_its_the_context_window_stupid.pdf
heita
0
1k
書籍「ユーザーストーリーマッピング」が私のバイブル
asumikam
4
490
When benchmarks go bad - what I learned from measuring performance wrong
hollycummins
0
390
Skillは並べた。動かなかった。契約で繋いだ。— 65個のSkillから、自走する開発サイクルへ
junholee
0
570
「なんか〇〇ライブラリで脆弱性あるみたいなんだけど。。。」から始める脆弱性対応 / First Steps in Vulnerability Response
mackey0225
2
120
Featured
See All Featured
Fireside Chat
paigeccino
42
3.9k
Claude Code どこまでも/ Claude Code Everywhere
nwiizo
65
55k
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
0
230
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.3k
Bootstrapping a Software Product
garrettdimon
PRO
307
120k
Chasing Engaging Ingredients in Design
codingconduct
0
190
For a Future-Friendly Web
brad_frost
183
10k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.3k
How to train your dragon (web standard)
notwaldorf
97
6.6k
Collaborative Software Design: How to facilitate domain modelling decisions
baasie
1
220
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
1
350
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