ViewController+MASAdditions.m 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. //
  2. // UIViewController+MASAdditions.m
  3. // Masonry
  4. //
  5. // Created by Craig Siemens on 2015-06-23.
  6. //
  7. //
  8. #import "ViewController+MASAdditions.h"
  9. #ifdef MAS_VIEW_CONTROLLER
  10. @implementation MAS_VIEW_CONTROLLER (MASAdditions)
  11. #pragma clang diagnostic push
  12. #pragma clang diagnostic ignored "-Wdeprecated-declarations"
  13. - (MASViewAttribute *)mas_topLayoutGuide {
  14. return [[MASViewAttribute alloc] initWithView:self.view item:self.topLayoutGuide layoutAttribute:NSLayoutAttributeBottom];
  15. }
  16. - (MASViewAttribute *)mas_topLayoutGuideTop {
  17. return [[MASViewAttribute alloc] initWithView:self.view item:self.topLayoutGuide layoutAttribute:NSLayoutAttributeTop];
  18. }
  19. - (MASViewAttribute *)mas_topLayoutGuideBottom {
  20. return [[MASViewAttribute alloc] initWithView:self.view item:self.topLayoutGuide layoutAttribute:NSLayoutAttributeBottom];
  21. }
  22. - (MASViewAttribute *)mas_bottomLayoutGuide {
  23. return [[MASViewAttribute alloc] initWithView:self.view item:self.bottomLayoutGuide layoutAttribute:NSLayoutAttributeTop];
  24. }
  25. - (MASViewAttribute *)mas_bottomLayoutGuideTop {
  26. return [[MASViewAttribute alloc] initWithView:self.view item:self.bottomLayoutGuide layoutAttribute:NSLayoutAttributeTop];
  27. }
  28. - (MASViewAttribute *)mas_bottomLayoutGuideBottom {
  29. return [[MASViewAttribute alloc] initWithView:self.view item:self.bottomLayoutGuide layoutAttribute:NSLayoutAttributeBottom];
  30. }
  31. #pragma clang diagnostic pop
  32. @end
  33. #endif