2018-04-10 16:37:11 -07:00
|
|
|
/**
|
|
|
|
* Copyright (c) 2015-present, Facebook, Inc.
|
|
|
|
*
|
|
|
|
* This source code is licensed under the MIT license found in the
|
|
|
|
* LICENSE file in the root directory of this source tree.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#import <UIKit/UIKit.h>
|
|
|
|
|
|
|
|
#import <React/RCTComponentViewProtocol.h>
|
|
|
|
#import <React/UIView+ComponentViewProtocol.h>
|
2018-06-09 13:02:55 -07:00
|
|
|
#import <fabric/core/EventEmitter.h>
|
2018-05-08 18:50:05 -07:00
|
|
|
#import <fabric/core/LayoutMetrics.h>
|
2018-05-08 22:56:04 -07:00
|
|
|
#import <fabric/core/Props.h>
|
2018-06-09 13:02:55 -07:00
|
|
|
#import <fabric/view/ViewEventEmitter.h>
|
2018-04-10 16:37:11 -07:00
|
|
|
|
|
|
|
NS_ASSUME_NONNULL_BEGIN
|
|
|
|
|
|
|
|
/**
|
|
|
|
* UIView class for <View> component.
|
|
|
|
*/
|
2018-05-08 18:50:05 -07:00
|
|
|
@interface RCTViewComponentView : UIView <RCTComponentViewProtocol> {
|
|
|
|
@protected
|
|
|
|
facebook::react::LayoutMetrics _layoutMetrics;
|
2018-05-08 22:56:04 -07:00
|
|
|
facebook::react::SharedProps _props;
|
2018-06-09 13:02:55 -07:00
|
|
|
facebook::react::SharedViewEventEmitter _eventEmitter;
|
2018-05-08 18:50:05 -07:00
|
|
|
}
|
2018-04-10 16:37:11 -07:00
|
|
|
|
2018-06-15 11:25:14 -07:00
|
|
|
/**
|
|
|
|
* Represents the `UIView` instance that is being automatically attached to
|
|
|
|
* the component view and laid out using on `layoutMetrics` (especially `size`
|
|
|
|
* and `padding`) of the component.
|
|
|
|
* This view must not be a component view; it's just a convenient way
|
|
|
|
* to embed/bridge pure native views as component views.
|
|
|
|
* Defaults to `nil`. Assing `nil` to remove view as subview.
|
|
|
|
*/
|
|
|
|
@property (nonatomic, strong, nullable) UIView *contentView;
|
|
|
|
|
2018-06-15 11:25:22 -07:00
|
|
|
/**
|
|
|
|
* Provides access to `nativeId` prop of the component.
|
|
|
|
* It might be used by subclasses (which need to refer to the view from
|
|
|
|
* other platform-specific external views or systems by some id) or
|
|
|
|
* by debugging/inspection tools.
|
|
|
|
* Defaults to `nil`.
|
|
|
|
*/
|
|
|
|
@property (nonatomic, strong, nullable) NSString *nativeId;
|
|
|
|
|
2018-04-10 16:37:11 -07:00
|
|
|
@end
|
|
|
|
|
|
|
|
NS_ASSUME_NONNULL_END
|