Skip to content

Commit 01d8cb6

Browse files
florismetteysbaiahmed1
authored andcommitted
fix: moving components
1 parent b3dec2b commit 01d8cb6

File tree

1 file changed

+1
-20
lines changed

1 file changed

+1
-20
lines changed

ios/MenuView.mm

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -73,26 +73,7 @@ - (void)unmountChildComponentView:(UIView<RCTComponentViewProtocol> *)childCompo
7373
}
7474

7575
- (void)setupChildViewAsMenuTrigger:(UIView *)childView
76-
{
77-
// Don't manually add the child view - React already added it via mountChildComponentView
78-
// Just ensure it has the correct constraints
79-
childView.translatesAutoresizingMaskIntoConstraints = NO;
80-
81-
// Remove any existing constraints on the child view to avoid conflicts
82-
[childView.constraints enumerateObjectsUsingBlock:^(NSLayoutConstraint *constraint, NSUInteger idx, BOOL *stop) {
83-
if (constraint.firstItem == childView || constraint.secondItem == childView) {
84-
[constraint setActive:NO];
85-
}
86-
}];
87-
88-
// Setup constraints to fill the container
89-
[NSLayoutConstraint activateConstraints:@[
90-
[childView.topAnchor constraintEqualToAnchor:self.topAnchor],
91-
[childView.leadingAnchor constraintEqualToAnchor:self.leadingAnchor],
92-
[childView.trailingAnchor constraintEqualToAnchor:self.trailingAnchor],
93-
[childView.bottomAnchor constraintEqualToAnchor:self.bottomAnchor]
94-
]];
95-
76+
{
9677
// If the child is a UIButton, attach the menu directly to it
9778
if ([childView isKindOfClass:[UIButton class]]) {
9879
_menuButton = (UIButton *)childView;

0 commit comments

Comments
 (0)