RACSubclassObject.m 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. //
  2. // RACSubclassObject.m
  3. // ReactiveCocoa
  4. //
  5. // Created by Josh Abernathy on 3/18/13.
  6. // Copyright (c) 2013 GitHub, Inc. All rights reserved.
  7. //
  8. #import "RACSubclassObject.h"
  9. #import "RACScheduler.h"
  10. @implementation RACSubclassObject
  11. - (void)forwardInvocation:(NSInvocation *)invocation {
  12. self.forwardedSelector = invocation.selector;
  13. }
  14. - (NSMethodSignature *)methodSignatureForSelector:(SEL)selector {
  15. NSParameterAssert(selector != NULL);
  16. NSMethodSignature *signature = [super methodSignatureForSelector:selector];
  17. if (signature != nil) return signature;
  18. return [super methodSignatureForSelector:@selector(description)];
  19. }
  20. - (NSString *)combineObjectValue:(id)objectValue andIntegerValue:(NSInteger)integerValue {
  21. NSString *appended = [[objectValue description] stringByAppendingString:@"SUBCLASS"];
  22. return [super combineObjectValue:appended andIntegerValue:integerValue];
  23. }
  24. - (void)setObjectValue:(id)objectValue andSecondObjectValue:(id)secondObjectValue {
  25. [RACScheduler.currentScheduler schedule:^{
  26. [super setObjectValue:objectValue andSecondObjectValue:secondObjectValue];
  27. }];
  28. }
  29. @end