Update NativeModulesIOS.md

This commit is contained in:
John Wu 2015-03-30 22:24:40 +08:00
parent 8df46c329b
commit 4f49271c28
1 changed files with 7 additions and 0 deletions

View File

@ -178,6 +178,11 @@ The native module can signal events to JavaScript without being invoked directly
```objective-c
#import "RCTBridge.h"
#import "RCTEventDispatcher.h"
@implementation CalendarManager
@synthesize bridge = _bridge;
- (void)calendarEventReminderReceived:(NSNotification *)notification
{
@ -185,6 +190,8 @@ The native module can signal events to JavaScript without being invoked directly
[self.bridge.eventDispatcher sendAppEventWithName:@"EventReminder"
body:@{@"name": eventName}];
}
@end
```
JavaScript code can subscribe to these events: