UISegmentedControl+RACSignalSupport.m 620 B

1234567891011121314151617181920
  1. //
  2. // UISegmentedControl+RACSignalSupport.m
  3. // ReactiveCocoa
  4. //
  5. // Created by Uri Baghin on 20/07/2013.
  6. // Copyright (c) 2013 GitHub, Inc. All rights reserved.
  7. //
  8. #import "UISegmentedControl+RACSignalSupport.h"
  9. #import "RACEXTKeyPathCoding.h"
  10. #import "UIControl+RACSignalSupport.h"
  11. #import "UIControl+RACSignalSupportPrivate.h"
  12. @implementation UISegmentedControl (RACSignalSupport)
  13. - (RACChannelTerminal *)rac_newSelectedSegmentIndexChannelWithNilValue:(NSNumber *)nilValue {
  14. return [self rac_channelForControlEvents:UIControlEventValueChanged key:@keypath(self.selectedSegmentIndex) nilValue:nilValue];
  15. }
  16. @end