@@ -26,35 +26,34 @@ - (instancetype)init
26
26
- (void )willMoveToSuperview : (UIView *)newSuperview
27
27
{
28
28
[super willMoveToSuperview: newSuperview];
29
- if ([newSuperview isKindOfClass: RNSScreenView.class ]) {
30
- RNSScreenView *screen = (RNSScreenView *)newSuperview;
31
- _parent = (RNSScreenView *)newSuperview;
32
-
33
- // [NSLayoutConstraint activateConstraints:@[
34
- // [NSLayoutConstraint constraintWithItem:self attribute:NSLayoutAttributeBottom
35
- // relatedBy:NSLayoutRelationEqual toItem:screen attribute:NSLayoutAttributeBottom multiplier:1.0
36
- // constant:0.0], [NSLayoutConstraint constraintWithItem:self attribute:NSLayoutAttributeLeft
37
- // relatedBy:NSLayoutRelationEqual toItem:screen attribute:NSLayoutAttributeLeft multiplier:1.0 constant:0.0],
38
- // [NSLayoutConstraint constraintWithItem:self attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationEqual
39
- // toItem:screen attribute:NSLayoutAttributeRight multiplier:1.0 constant:0.0], [NSLayoutConstraint
40
- // constraintWithItem:self attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:screen
41
- // attribute:NSLayoutAttributeTop multiplier:1.0 constant:0.0], [NSLayoutConstraint constraintWithItem:screen
42
- // attribute:NSLayoutAttributeBottom relatedBy:NSLayoutRelationEqual toItem:self
43
- // attribute:NSLayoutAttributeBottom multiplier:1.0 constant:0.0], [NSLayoutConstraint
44
- // constraintWithItem:screen attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:self
45
- // attribute:NSLayoutAttributeLeft multiplier:1.0 constant:0.0], [NSLayoutConstraint constraintWithItem:screen
46
- // attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationEqual toItem:self
47
- // attribute:NSLayoutAttributeRight multiplier:1.0 constant:0.0], [NSLayoutConstraint constraintWithItem:screen
48
- // attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:self attribute:NSLayoutAttributeTop
49
- // multiplier:1.0 constant:0.0],
50
- // ]];
51
- // [self setNeedsLayout];
52
- }
29
+ // if ([newSuperview isKindOfClass:RNSScreenView.class]) {
30
+ // RNSScreenView *screen = (RNSScreenView *)newSuperview;
31
+ // _parent = (RNSScreenView *)newSuperview;
32
+
33
+ // [NSLayoutConstraint activateConstraints:@[
34
+ // [NSLayoutConstraint constraintWithItem:self attribute:NSLayoutAttributeBottom
35
+ // relatedBy:NSLayoutRelationEqual toItem:screen attribute:NSLayoutAttributeBottom multiplier:1.0
36
+ // constant:0.0], [NSLayoutConstraint constraintWithItem:self attribute:NSLayoutAttributeLeft
37
+ // relatedBy:NSLayoutRelationEqual toItem:screen attribute:NSLayoutAttributeLeft multiplier:1.0 constant:0.0],
38
+ // [NSLayoutConstraint constraintWithItem:self attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationEqual
39
+ // toItem:screen attribute:NSLayoutAttributeRight multiplier:1.0 constant:0.0], [NSLayoutConstraint
40
+ // constraintWithItem:self attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:screen
41
+ // attribute:NSLayoutAttributeTop multiplier:1.0 constant:0.0], [NSLayoutConstraint constraintWithItem:screen
42
+ // attribute:NSLayoutAttributeBottom relatedBy:NSLayoutRelationEqual toItem:self
43
+ // attribute:NSLayoutAttributeBottom multiplier:1.0 constant:0.0], [NSLayoutConstraint
44
+ // constraintWithItem:screen attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:self
45
+ // attribute:NSLayoutAttributeLeft multiplier:1.0 constant:0.0], [NSLayoutConstraint constraintWithItem:screen
46
+ // attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationEqual toItem:self
47
+ // attribute:NSLayoutAttributeRight multiplier:1.0 constant:0.0], [NSLayoutConstraint constraintWithItem:screen
48
+ // attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:self attribute:NSLayoutAttributeTop
49
+ // multiplier:1.0 constant:0.0],
50
+ // ]];
51
+ // [self setNeedsLayout];
52
+ // }
53
53
}
54
54
55
55
- (void )didMoveToSuperview
56
56
{
57
- NSLog (@" Adding constraints between %@ and %@ " , self, _parent);
58
57
if (_parent != nil ) {
59
58
// [NSLayoutConstraint activateConstraints:@[
60
59
// [NSLayoutConstraint constraintWithItem:self
0 commit comments