Commit 6d2309b 1 parent 13ea927 commit 6d2309b Copy full SHA for 6d2309b
File tree 2 files changed +7
-22
lines changed
2 files changed +7
-22
lines changed Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ - (instancetype)initWithFrame:(CGRect)frame
25
25
if (self = [super initWithFrame: frame]) {
26
26
static const auto defaultProps = std::make_shared<const RNMBXMarkerViewProps>();
27
27
_props = defaultProps;
28
- [self prepareView ];
28
+ [self prepareView ];
29
29
}
30
30
31
31
return self;
@@ -39,26 +39,18 @@ - (void)prepareView
39
39
40
40
- (void )prepareForRecycle
41
41
{
42
- [super prepareForRecycle ];
43
- [self prepareView ];
42
+ [super prepareForRecycle ];
43
+ [self prepareView ];
44
44
}
45
45
46
46
- (void )mountChildComponentView : (UIView<RCTComponentViewProtocol> *)childComponentView index : (NSInteger )index
47
47
{
48
- if ([childComponentView isKindOfClass: [RCTViewComponentView class ]] && ((RCTViewComponentView *)childComponentView).contentView != nil ) {
49
- [_view insertSubview: ((RCTViewComponentView *)childComponentView).contentView atIndex: index ];
50
- } else {
51
- [_view insertSubview: childComponentView atIndex: index ];
52
- }
48
+ [_view insertSubview: childComponentView atIndex: index ];
53
49
}
54
50
55
51
- (void )unmountChildComponentView : (UIView<RCTComponentViewProtocol> *)childComponentView index : (NSInteger )index
56
52
{
57
- if ([childComponentView isKindOfClass: [RCTViewComponentView class ]] && ((RCTViewComponentView *)childComponentView).contentView != nil ) {
58
- [((RCTViewComponentView *)childComponentView).contentView removeFromSuperview ];
59
- } else {
60
- [childComponentView removeFromSuperview ];
61
- }
53
+ [childComponentView removeFromSuperview ];
62
54
}
63
55
64
56
#pragma mark - RCTComponentViewProtocol
Original file line number Diff line number Diff line change @@ -17,27 +17,20 @@ @interface RNMBXMarkerViewContentComponentView () <RCTRNMBXMarkerViewContentView
17
17
@end
18
18
19
19
@implementation RNMBXMarkerViewContentComponentView {
20
- RNMBXMarkerView *_view;
20
+ UIView *_view;
21
21
CGRect _frame;
22
22
}
23
23
24
24
- (instancetype )initWithFrame : (CGRect )frame
25
25
{
26
26
if (self = [super initWithFrame: frame]) {
27
- static const auto defaultProps = std::make_shared<const RNMBXMarkerViewProps >();
27
+ static const auto defaultProps = std::make_shared<const RNMBXMarkerViewContentProps >();
28
28
_props = defaultProps;
29
29
_frame = frame;
30
- [self prepareView ];
31
30
}
32
31
return self;
33
32
}
34
33
35
- - (void )prepareView
36
- {
37
- _view = [[RNMBXMarkerView alloc ] initWithFrame: _frame];
38
- self.contentView = _view;
39
- }
40
-
41
34
#pragma mark - RCTComponentViewProtocol
42
35
43
36
+ (ComponentDescriptorProvider)componentDescriptorProvider
You can’t perform that action at this time.
0 commit comments