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
26 changes: 20 additions & 6 deletions React/Views/RCTModalHostView.m
Original file line number Diff line number Diff line change
Expand Up @@ -114,13 +114,27 @@ - (void)didUpdateReactSubviews
// Do nothing, as subview (singular) is managed by `insertReactSubview:atIndex:`
}

/**
Fix for Modal Freeze issue on iOS
Ref Thread: https://github.com/facebook/react-native/pull/32450
*/
// - (void)dismissModalViewController
// {
// if (_isPresented) {
// [_delegate dismissModalHostView:self withViewController:_modalViewController animated:[self hasAnimationType]];
// _isPresented = NO;
// }
// }

- (void)dismissModalViewController
{
if (_isPresented) {
[_delegate dismissModalHostView:self withViewController:_modalViewController animated:[self hasAnimationType]];
_isPresented = NO;
}
}
{
dispatch_async(dispatch_get_main_queue(), ^{
if (self->_isPresented) {
[self->_delegate dismissModalHostView:self withViewController:self->_modalViewController animated:[self hasAnimationType]];
self->_isPresented = NO;
}
});
}

- (void)didMoveToWindow
{
Expand Down