Skip to content

Commit

Permalink
🐞 Fix: modalPresentationStyle Not Applying
Browse files Browse the repository at this point in the history
  • Loading branch information
dominicstop committed Mar 30, 2023
1 parent 5905c96 commit b5dba75
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions ios/src_library/React Native/RNIModalView/RNIModalView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -523,12 +523,22 @@ class RNIModalView: UIView, RNIModalFocusNotifying, RNIModalIdentity,
return;
};

// weird bug where you cant present fullscreen if `presentationController`
// delegate is set so only set the delegate when we are using a page sheet
/// `Note:2023-03-30-15-20-27`
///
/// * Weird bug where you cannot present set the modal to present in
/// fullscreen if `presentationController` delegate is set.
///
/// * So don't set the delegate when we are using a "fullscreen-like"
/// presentation
///
switch self.synthesizedModalPresentationStyle {
case .automatic, .pageSheet, .formSheet:
case .overFullScreen,
.fullScreen:
// no-op
break;

default:
modalVC.presentationController?.delegate = self;
default: break;
};

modalVC.modalTransitionStyle = self.synthesizedModalTransitionStyle;
Expand Down

0 comments on commit b5dba75

Please sign in to comment.