@lodev09/react-native-true-sheet 3.6.0 → 3.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -123,6 +123,14 @@
|
|
|
123
123
|
return window ? window.safeAreaInsets.bottom : 0;
|
|
124
124
|
}
|
|
125
125
|
|
|
126
|
+
- (BOOL)isDesignCompatibilityMode {
|
|
127
|
+
if (@available(iOS 26.0, *)) {
|
|
128
|
+
NSNumber *value = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"UIDesignRequiresCompatibility"];
|
|
129
|
+
return value.boolValue;
|
|
130
|
+
}
|
|
131
|
+
return NO;
|
|
132
|
+
}
|
|
133
|
+
|
|
126
134
|
- (NSInteger)currentDetentIndex {
|
|
127
135
|
UISheetPresentationController *sheet = self.sheet;
|
|
128
136
|
if (!sheet)
|
|
@@ -661,12 +669,19 @@
|
|
|
661
669
|
}
|
|
662
670
|
|
|
663
671
|
- (void)setupBackground {
|
|
672
|
+
BOOL useBackgroundEffect = NO;
|
|
673
|
+
if (@available(iOS 26.1, *)) {
|
|
674
|
+
useBackgroundEffect = !self.isDesignCompatibilityMode;
|
|
675
|
+
}
|
|
676
|
+
|
|
664
677
|
// iOS 26.1+: use native backgroundEffect when only backgroundBlur is set (no backgroundColor)
|
|
665
678
|
if (@available(iOS 26.1, *)) {
|
|
666
|
-
if (
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
679
|
+
if (useBackgroundEffect) {
|
|
680
|
+
if (!self.backgroundColor && self.backgroundBlur && self.backgroundBlur.length > 0) {
|
|
681
|
+
UIBlurEffectStyle style = [BlurUtil blurEffectStyleFromString:self.backgroundBlur];
|
|
682
|
+
self.sheet.backgroundEffect = [UIBlurEffect effectWithStyle:style];
|
|
683
|
+
return;
|
|
684
|
+
}
|
|
670
685
|
}
|
|
671
686
|
}
|
|
672
687
|
|
|
@@ -696,12 +711,13 @@
|
|
|
696
711
|
}
|
|
697
712
|
|
|
698
713
|
if (@available(iOS 26.1, *)) {
|
|
699
|
-
if (self.backgroundColor) {
|
|
714
|
+
if (useBackgroundEffect && self.backgroundColor) {
|
|
700
715
|
self.sheet.backgroundEffect = [UIColorEffect effectWithColor:self.backgroundColor];
|
|
716
|
+
return;
|
|
701
717
|
}
|
|
702
|
-
} else {
|
|
703
|
-
self.view.backgroundColor = self.backgroundColor;
|
|
704
718
|
}
|
|
719
|
+
|
|
720
|
+
self.view.backgroundColor = self.backgroundColor;
|
|
705
721
|
}
|
|
706
722
|
|
|
707
723
|
- (void)setupGrabber {
|
package/package.json
CHANGED