Skip to content
Open
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
12 changes: 12 additions & 0 deletions ios/src_library/React Native/RCTModalView/RCTModalView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,19 @@ class RCTModalView: UIView {
.fullScreen,
.overFullScreen:

// https://developer.apple.com/documentation/uikit/uisheetpresentationcontroller
// Provides better support for the popular Bottom Sheet modal UX.
if (style is .pagesheet) {
if #available(iOS 15.0, *) {
if let sheet = nav.sheetPresentationController {
nav.title = "Some Custom Title"
sheet.detents = [.medium(), .large()]
}
}
}

self._modalPresentationStyle = style;

#if DEBUG
print("RCTModalView, modalPresentationStyle didSet: \(style.stringDescription())");
#endif
Expand Down