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
930
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
PDI: Como Alavancar Sua Carreira e Seu Negócio
marcelgsantos
0
120
Kingdom of the Machine
yui_knk
2
370
Server-Side Kotlin LT大会 vol.18 [Kotlin-lspの最新情報と Neovimのlsp設定例]
yasunori0418
1
160
HTML-Aware ERB: The Path to Reactive Rendering @ RubyKaigi 2026, Hakodate, Japan
marcoroth
0
150
SREに優しいTerraform構成 modulesとstateの組み方
hiyanger
2
130
ふりがな Deep Dive try! Swift Tokyo 2026
watura
0
220
Oxlintとeslint-plugin-react-hooks 明日から始められそう?
t6adev
0
270
TiDBのアーキテクチャから学ぶ分散システム入門 〜MySQL互換のNewSQLは何を解決するのか〜 / tidb-architecture-study
dznbk
1
180
年間50登壇、単著出版、雑誌寄稿、Podcast出演、YouTube、CM、カンファレンス主催……全部やってみたので面白さ等を比較してみよう / I’ve tried them all, so let’s compare how interesting they are.
nrslib
4
790
AIエージェントで業務改善してみた
taku271
0
530
Coding as Prompting Since 2025
ragingwind
0
840
2026_04_15_量子計算をパズルとして解く
hideakitakechi
0
110
Featured
See All Featured
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.4k
Design in an AI World
tapps
1
200
Marketing Yourself as an Engineer | Alaka | Gurzu
gurzu
0
180
30 Presentation Tips
portentint
PRO
1
280
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
38
2.8k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.4k
Making the Leap to Tech Lead
cromwellryan
135
9.8k
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
150
AI: The stuff that nobody shows you
jnunemaker
PRO
6
570
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
1
350
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
Navigating Team Friction
lara
192
16k
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