Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 1 addition & 20 deletions ios/MenuView.mm
Original file line number Diff line number Diff line change
Expand Up @@ -73,26 +73,7 @@ - (void)unmountChildComponentView:(UIView<RCTComponentViewProtocol> *)childCompo
}

- (void)setupChildViewAsMenuTrigger:(UIView *)childView
{
// Don't manually add the child view - React already added it via mountChildComponentView
// Just ensure it has the correct constraints
childView.translatesAutoresizingMaskIntoConstraints = NO;

// Remove any existing constraints on the child view to avoid conflicts
[childView.constraints enumerateObjectsUsingBlock:^(NSLayoutConstraint *constraint, NSUInteger idx, BOOL *stop) {
if (constraint.firstItem == childView || constraint.secondItem == childView) {
[constraint setActive:NO];
}
}];

// Setup constraints to fill the container
[NSLayoutConstraint activateConstraints:@[
[childView.topAnchor constraintEqualToAnchor:self.topAnchor],
[childView.leadingAnchor constraintEqualToAnchor:self.leadingAnchor],
[childView.trailingAnchor constraintEqualToAnchor:self.trailingAnchor],
[childView.bottomAnchor constraintEqualToAnchor:self.bottomAnchor]
]];

{
// If the child is a UIButton, attach the menu directly to it
if ([childView isKindOfClass:[UIButton class]]) {
_menuButton = (UIButton *)childView;
Expand Down
Loading