问题
I need to model following in RAC.
I have a tabBarController which will subscribe to a notification signal. Say push notification. Also say currently active view controller may also be want to subscribe to the same signal. But if any view controller subscribed to it tabBarController doesn't want to handle it. Otherwise it will handle it. Also when current visible view controller changes. It needs to delegate back the responsibility to tabController.
Currently without RAC I maintain array of observers at tabController. If any observer present for particular kind of notification. It will delegate to viewController otherwise tabController will take care of it.
Any better way to model this using RAC?
来源:https://stackoverflow.com/questions/36026927/reactive-cocoa-limit-a-signal-to-only-one-subscriber-at-once