From 9a8eb64b60440160ecbaa18d51383fd8a798761d Mon Sep 17 00:00:00 2001 From: Kacper Kafara Date: Tue, 22 Aug 2023 11:12:25 +0200 Subject: [PATCH] Remove RNS Array utility --- ios/RNSScreen.mm | 5 ++--- ios/utils/NSArray+RNSUtil.h | 12 ------------ ios/utils/NSArray+RNSUtil.mm | 15 --------------- 3 files changed, 2 insertions(+), 30 deletions(-) delete mode 100644 ios/utils/NSArray+RNSUtil.h delete mode 100644 ios/utils/NSArray+RNSUtil.mm diff --git a/ios/RNSScreen.mm b/ios/RNSScreen.mm index 70a068e7b4..4e40287766 100644 --- a/ios/RNSScreen.mm +++ b/ios/RNSScreen.mm @@ -22,7 +22,6 @@ #import #import -#import "NSArray+RNSUtil.h" #import "RNSScreenStack.h" #import "RNSScreenStackHeaderConfig.h" @@ -616,7 +615,7 @@ - (void)updateFormSheetPresentationStyle if (_stackPresentation == RNSScreenStackPresentationFormSheet && sheet != nil) { #if defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && defined(__IPHONE_16_0) && \ __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_16_0 - if ([_sheetCustomDetents rns_isNotEmpty]) { + if (_sheetCustomDetents.count > 0) { if (@available(iOS 16.0, *)) { sheet.detents = [self detentsFromMaxHeightFractions:_sheetCustomDetents]; } @@ -651,7 +650,7 @@ - (void)updateFormSheetPresentationStyle _sheetCornerRadius < 0 ? UISheetPresentationControllerAutomaticDimension : _sheetCornerRadius; int detentIndex = _sheetCustomLargestUndimmedDetent != nil ? _sheetCustomLargestUndimmedDetent.intValue : -1; - if (detentIndex != -1 && [_sheetCustomDetents rns_isNotEmpty]) { + if (detentIndex != -1 && _sheetCustomDetents.count > 0) { if (detentIndex >= 0 && detentIndex < _sheetCustomDetents.count) { sheet.largestUndimmedDetentIdentifier = _sheetCustomLargestUndimmedDetent.stringValue; } else { diff --git a/ios/utils/NSArray+RNSUtil.h b/ios/utils/NSArray+RNSUtil.h deleted file mode 100644 index 56c2523bbe..0000000000 --- a/ios/utils/NSArray+RNSUtil.h +++ /dev/null @@ -1,12 +0,0 @@ -#import - -NS_ASSUME_NONNULL_BEGIN - -@interface NSArray (RNSUtil) - -- (BOOL)rns_isEmpty; -- (BOOL)rns_isNotEmpty; - -@end - -NS_ASSUME_NONNULL_END diff --git a/ios/utils/NSArray+RNSUtil.mm b/ios/utils/NSArray+RNSUtil.mm deleted file mode 100644 index deaa56f2be..0000000000 --- a/ios/utils/NSArray+RNSUtil.mm +++ /dev/null @@ -1,15 +0,0 @@ -#import "NSArray+RNSUtil.h" - -@implementation NSArray (RNSUtil) - -- (BOOL)rns_isEmpty -{ - return self.count == 0; -} - -- (BOOL)rns_isNotEmpty -{ - return self.count > 0; -} - -@end