RACBehaviorSubject.h 573 B

1234567891011121314151617181920212223
  1. //
  2. // RACBehaviorSubject.h
  3. // ReactiveObjC
  4. //
  5. // Created by Josh Abernathy on 3/16/12.
  6. // Copyright (c) 2012 GitHub, Inc. All rights reserved.
  7. //
  8. #import "RACSubject.h"
  9. NS_ASSUME_NONNULL_BEGIN
  10. /// A behavior subject sends the last value it received when it is subscribed to.
  11. @interface RACBehaviorSubject : RACSubject
  12. /// Creates a new behavior subject with a default value. If it hasn't received
  13. /// any values when it gets subscribed to, it sends the default value.
  14. + (instancetype)behaviorSubjectWithDefaultValue:(nullable id)value;
  15. @end
  16. NS_ASSUME_NONNULL_END