RCTShadowView+Layout.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. /*
  2. * Copyright (c) Facebook, Inc. and its affiliates.
  3. *
  4. * This source code is licensed under the MIT license found in the
  5. * LICENSE file in the root directory of this source tree.
  6. */
  7. #import <UIKit/UIKit.h>
  8. #import <React/RCTShadowView.h>
  9. @interface RCTShadowView (Layout)
  10. #pragma mark - Computed Layout-Inferred Metrics
  11. @property (nonatomic, readonly) UIEdgeInsets paddingAsInsets;
  12. @property (nonatomic, readonly) UIEdgeInsets borderAsInsets;
  13. @property (nonatomic, readonly) UIEdgeInsets compoundInsets;
  14. @property (nonatomic, readonly) CGSize availableSize;
  15. @property (nonatomic, readonly) CGRect contentFrame;
  16. #pragma mark - Dirty Propagation Control
  17. /**
  18. * Designated method to control dirty propagation mechanism.
  19. * Dirties the shadow view (and all affected shadow views, usually a superview)
  20. * in terms of layout.
  21. * The default implementation does nothing.
  22. */
  23. - (void)dirtyLayout;
  24. /**
  25. * Designated method to control dirty propagation mechanism.
  26. * Clears (makes not dirty) the shadow view.
  27. * The default implementation does nothing.
  28. */
  29. - (void)clearLayout;
  30. @end