UIView+Layout.h 469 B

12345678910111213141516171819202122
  1. //
  2. // UIView+Layout.h
  3. // FLEX
  4. //
  5. // Created by Tanner Bennett on 7/18/19.
  6. //Copyright © 2019 Flipboard. All rights reserved.
  7. //
  8. #import <UIKit/UIKit.h>
  9. #define Padding(p) UIEdgeInsetsMake(p, p, p, p)
  10. @interface UIView (Layout)
  11. - (void)centerInView:(UIView *)view;
  12. - (void)pinEdgesTo:(UIView *)view;
  13. - (void)pinEdgesTo:(UIView *)view withInsets:(UIEdgeInsets)insets;
  14. - (void)pinEdgesToSuperview;
  15. - (void)pinEdgesToSuperviewWithInsets:(UIEdgeInsets)insets;
  16. @end