@lodev09/react-native-true-sheet 3.6.0 → 3.6.2
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,27 @@
|
|
|
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)
|
|
678
|
+
// Fall back to TrueSheetBlurView when blur intensity is set (not 100%) since
|
|
679
|
+
// sheet.backgroundEffect doesn't support intensity control
|
|
665
680
|
if (@available(iOS 26.1, *)) {
|
|
666
|
-
if (
|
|
667
|
-
|
|
668
|
-
self.
|
|
669
|
-
|
|
681
|
+
if (useBackgroundEffect) {
|
|
682
|
+
BOOL hasCustomIntensity = self.blurIntensity && [self.blurIntensity floatValue] < 100;
|
|
683
|
+
if (!self.backgroundColor && self.backgroundBlur && self.backgroundBlur.length > 0) {
|
|
684
|
+
if (hasCustomIntensity) {
|
|
685
|
+
// Clear native effect to allow custom blur view with intensity
|
|
686
|
+
self.sheet.backgroundEffect = [UIColorEffect effectWithColor:[UIColor clearColor]];
|
|
687
|
+
} else {
|
|
688
|
+
UIBlurEffectStyle style = [BlurUtil blurEffectStyleFromString:self.backgroundBlur];
|
|
689
|
+
self.sheet.backgroundEffect = [UIBlurEffect effectWithStyle:style];
|
|
690
|
+
return;
|
|
691
|
+
}
|
|
692
|
+
}
|
|
670
693
|
}
|
|
671
694
|
}
|
|
672
695
|
|
|
@@ -696,12 +719,13 @@
|
|
|
696
719
|
}
|
|
697
720
|
|
|
698
721
|
if (@available(iOS 26.1, *)) {
|
|
699
|
-
if (self.backgroundColor) {
|
|
722
|
+
if (useBackgroundEffect && self.backgroundColor) {
|
|
700
723
|
self.sheet.backgroundEffect = [UIColorEffect effectWithColor:self.backgroundColor];
|
|
724
|
+
return;
|
|
701
725
|
}
|
|
702
|
-
} else {
|
|
703
|
-
self.view.backgroundColor = self.backgroundColor;
|
|
704
726
|
}
|
|
727
|
+
|
|
728
|
+
self.view.backgroundColor = self.backgroundColor;
|
|
705
729
|
}
|
|
706
730
|
|
|
707
731
|
- (void)setupGrabber {
|
package/package.json
CHANGED