[RN] fix duplicate observe

This commit is contained in:
Jiajie Zhu 2015-05-31 14:33:59 -07:00
parent 595eae8b67
commit df58789f22
1 changed files with 5 additions and 6 deletions

View File

@ -48,18 +48,17 @@ RCT_EXPORT_MODULE()
for (NSString *name in @[UIApplicationDidBecomeActiveNotification,
UIApplicationDidEnterBackgroundNotification,
UIApplicationDidFinishLaunchingNotification]) {
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(handleAppStateDidChange)
name:name
object:nil];
}
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(handleMemoryWarning)
name:UIApplicationDidReceiveMemoryWarningNotification
object:nil];
}
}
return self;
}