RCTAutoInsetsProtocol.h 878 B

123456789101112131415161718192021222324252627
  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. /**
  9. * Defines a View that wants to support auto insets adjustment
  10. */
  11. @protocol RCTAutoInsetsProtocol
  12. @property (nonatomic, assign, readwrite) UIEdgeInsets contentInset;
  13. @property (nonatomic, assign, readwrite) BOOL automaticallyAdjustContentInsets;
  14. /**
  15. * Automatically adjusted content inset depends on view controller's top and bottom
  16. * layout guides so if you've changed one of them (e.g. after rotation or manually) you should call this method
  17. * to recalculate and refresh content inset.
  18. * To handle case with changing navigation bar height call this method from viewDidLayoutSubviews:
  19. * of your view controller.
  20. */
  21. - (void)refreshContentInset;
  22. @end