RACTestUIButton.m 675 B

12345678910111213141516171819202122232425262728
  1. //
  2. // RACTestUIButton.m
  3. // ReactiveCocoa
  4. //
  5. // Created by Justin Spahr-Summers on 2013-06-15.
  6. // Copyright (c) 2013 GitHub, Inc. All rights reserved.
  7. //
  8. #import "RACTestUIButton.h"
  9. @implementation RACTestUIButton
  10. + (instancetype)button {
  11. RACTestUIButton *button = [self buttonWithType:UIButtonTypeCustom];
  12. return button;
  13. }
  14. // Required for unit testing – controls don't work normally
  15. // outside of normal apps.
  16. -(void)sendAction:(SEL)action to:(id)target forEvent:(UIEvent *)event {
  17. #pragma clang diagnostic push
  18. #pragma clang diagnostic ignored "-Warc-performSelector-leaks"
  19. [target performSelector:action withObject:self];
  20. #pragma clang diagnostic pop
  21. }
  22. @end