Skip to content

Commit

Permalink
🐞 Fix: Modal Sheet-Related Events
Browse files Browse the repository at this point in the history
  • Loading branch information
dominicstop committed Apr 22, 2023
1 parent ab5b00b commit fe633b6
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions ios/src_library/React Native/RNIModalView/RNIModalView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ public class RNIModalView:
@objc var sheetShouldAnimateChanges: Bool = true;

@objc var sheetLargestUndimmedDetentIdentifier: String? {
willSet {
didSet {
guard #available(iOS 15.0, *),
let sheetController = self.sheetPresentationController
else { return };
Expand All @@ -240,8 +240,11 @@ public class RNIModalView:
};

@objc var sheetPreferredCornerRadius: NSNumber? {
willSet {
didSet {
let newValue = self.sheetPreferredCornerRadius;

guard #available(iOS 15.0, *),
oldValue != newValue,
let sheetController = self.sheetPresentationController,
let cornerRadius = newValue?.doubleValue
else { return };
Expand All @@ -253,8 +256,8 @@ public class RNIModalView:
};

@objc var sheetSelectedDetentIdentifier: String? {
willSet {
let oldValue = self.sheetSelectedDetentIdentifier;
didSet {
let newValue = self.sheetSelectedDetentIdentifier;

guard oldValue != newValue,
#available(iOS 15.0, *),
Expand Down

0 comments on commit fe633b6

Please sign in to comment.