RCTWrapperView.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536
  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. typedef CGSize (^RCTWrapperMeasureBlock)(CGSize minimumSize, CGSize maximumSize);
  9. @class RCTBridge;
  10. NS_ASSUME_NONNULL_BEGIN
  11. @interface RCTWrapperView : UIView
  12. @property (nonatomic, retain, nullable) UIView *contentView;
  13. @property (nonatomic, readonly) RCTWrapperMeasureBlock measureBlock;
  14. - (instancetype)initWithBridge:(RCTBridge *)bridge NS_DESIGNATED_INITIALIZER;
  15. #pragma mark - Restrictions
  16. - (instancetype)init NS_UNAVAILABLE;
  17. - (instancetype)initWithFrame:(CGRect)frame NS_UNAVAILABLE;
  18. - (instancetype)initWithCoder:(NSCoder *)decoder NS_UNAVAILABLE;
  19. - (void)addSubview:(UIView *)view NS_UNAVAILABLE;
  20. - (void)insertSubview:(UIView *)view atIndex:(NSInteger)index NS_UNAVAILABLE;
  21. - (void)insertSubview:(UIView *)view aboveSubview:(UIView *)siblingSubview NS_UNAVAILABLE;
  22. - (void)insertSubview:(UIView *)view belowSubview:(UIView *)siblingSubview NS_UNAVAILABLE;
  23. @end
  24. NS_ASSUME_NONNULL_END