NSArray+MASShorthandAdditions.h 1016 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. //
  2. // NSArray+MASShorthandAdditions.h
  3. // Masonry
  4. //
  5. // Created by Jonas Budelmann on 22/07/13.
  6. // Copyright (c) 2013 Jonas Budelmann. All rights reserved.
  7. //
  8. #import "NSArray+MASAdditions.h"
  9. #ifdef MAS_SHORTHAND
  10. /**
  11. * Shorthand array additions without the 'mas_' prefixes,
  12. * only enabled if MAS_SHORTHAND is defined
  13. */
  14. @interface NSArray (MASShorthandAdditions)
  15. - (NSArray *)makeConstraints:(void(^)(MASConstraintMaker *make))block;
  16. - (NSArray *)updateConstraints:(void(^)(MASConstraintMaker *make))block;
  17. - (NSArray *)remakeConstraints:(void(^)(MASConstraintMaker *make))block;
  18. @end
  19. @implementation NSArray (MASShorthandAdditions)
  20. - (NSArray *)makeConstraints:(void(^)(MASConstraintMaker *))block {
  21. return [self mas_makeConstraints:block];
  22. }
  23. - (NSArray *)updateConstraints:(void(^)(MASConstraintMaker *))block {
  24. return [self mas_updateConstraints:block];
  25. }
  26. - (NSArray *)remakeConstraints:(void(^)(MASConstraintMaker *))block {
  27. return [self mas_remakeConstraints:block];
  28. }
  29. @end
  30. #endif