iOS RAC中界面销毁时移除通知

RACSignal *signal = [[[NSNotificationCenter defaultCenter] rac_addObserverForName:@"Value" object:nil] takeUntil:[self rac_willDeallocSignal]];
[signal subscribeNext:^(NSNotification * _Nullable x) {
  NSLog(@"%@", x);
}];
[signal subscribeCompleted:^{
  NSLog(@"%@", @"通知被移除");
}];

你可能感兴趣的:(iOS RAC中界面销毁时移除通知)