fix: adapt min_ios_version_supported (#38685)

Summary:
Adapt to the minimum version of iOS and fix unnecessary, incorrect code and comments.

## Changelog:
[IOS] [FIXED] - adapt min_ios_version_supported.

Pull Request resolved: https://github.com/facebook/react-native/pull/38685

Reviewed By: NickGerleman

Differential Revision: D47960465

Pulled By: ryancat

fbshipit-source-id: ae91fc89307709359cef0e4a8106b03beb1fa57a
This commit is contained in:
zhuwencheng
2023-08-01 21:06:25 -07:00
committed by Facebook GitHub Bot
parent c616148a05
commit 00b142f59a
5 changed files with 4 additions and 8 deletions
@@ -90,7 +90,7 @@
NSNumber *gifLoopCount = gifProperties[(__bridge NSString *)kCGImagePropertyGIFLoopCount];
if (gifLoopCount != nil) {
loopCount = gifLoopCount.unsignedIntegerValue;
if (@available(iOS 14, *)) {
if (@available(iOS 14.0, *)) {
} else {
// A loop count of 1 means it should animate twice, 2 means, thrice, etc.
if (loopCount != 0) {
@@ -170,7 +170,7 @@ static UIColor *defaultPlaceholderColor(void)
}
// Turn off scroll animation to fix flaky scrolling.
// This is only necessary for iOS <= 14.
// This is only necessary for iOS < 14.
#if defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && __IPHONE_OS_VERSION_MAX_ALLOWED < 140000
- (void)setContentOffset:(CGPoint)contentOffset animated:(__unused BOOL)animated
{
@@ -56,9 +56,7 @@
{
[_alertWindow setHidden:YES];
if (@available(iOS 13, *)) {
_alertWindow.windowScene = nil;
}
_alertWindow.windowScene = nil;
_alertWindow = nil;
}
@@ -98,9 +98,7 @@ RCT_EXPORT_VIEW_PROPERTY(onScrollEndDrag, RCTDirectEventBlock)
RCT_EXPORT_VIEW_PROPERTY(onMomentumScrollBegin, RCTDirectEventBlock)
RCT_EXPORT_VIEW_PROPERTY(onMomentumScrollEnd, RCTDirectEventBlock)
RCT_EXPORT_VIEW_PROPERTY(inverted, BOOL)
#if defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 130000 /* __IPHONE_13_0 */
RCT_EXPORT_VIEW_PROPERTY(automaticallyAdjustsScrollIndicatorInsets, BOOL)
#endif
RCT_EXPORT_VIEW_PROPERTY(contentInsetAdjustmentBehavior, UIScrollViewContentInsetAdjustmentBehavior)
// overflow is used both in css-layout as well as by react-native. In css-layout
@@ -14,7 +14,7 @@ Pod::Spec.new do |spec|
:sha256 => 'f0397ba6e982c4450f27bf32a2a83292aba035b827a5623a14636ea583318c41' }
# Pinning to the same version as React.podspec.
spec.platforms = { :ios => '11.0' }
spec.platforms = { :ios => min_ios_version_supported }
spec.requires_arc = false
spec.module_name = 'boost'