diff --git a/Libraries/Image/RCTUIImageViewAnimated.m b/Libraries/Image/RCTUIImageViewAnimated.m index f6fb5bc60cc..4ab99406a3c 100644 --- a/Libraries/Image/RCTUIImageViewAnimated.m +++ b/Libraries/Image/RCTUIImageViewAnimated.m @@ -185,14 +185,8 @@ static NSUInteger RCTDeviceFreeMemory() { #else // displaylink.duration -- time interval between frames, assuming maximumFramesPerSecond // displayLink.preferredFramesPerSecond (>= iOS 10) -- Set to 30 for displayDidRefresh to be called at 30 fps - // displayLink.frameInterval (< iOS 10) -- # of frames that must pass before each displayDidRefresh. After iOS 10, when this is set to 2, preferredFramesPerSecond becomes 30 fps. // durationToNextRefresh -- Time interval to the next time displayDidRefresh is called - NSTimeInterval durationToNextRefresh; - if (@available(iOS 10.0, *)) { - durationToNextRefresh = displayLink.targetTimestamp - displayLink.timestamp; - } else { - durationToNextRefresh = displayLink.duration * displayLink.frameInterval; - } + NSTimeInterval durationToNextRefresh = displayLink.targetTimestamp - displayLink.timestamp; #endif NSUInteger totalFrameCount = self.totalFrameCount; NSUInteger currentFrameIndex = self.currentFrameIndex; diff --git a/Libraries/Text/TextInput/RCTBaseTextInputView.m b/Libraries/Text/TextInput/RCTBaseTextInputView.m index 4a8ed67d28f..9edad515f00 100644 --- a/Libraries/Text/TextInput/RCTBaseTextInputView.m +++ b/Libraries/Text/TextInput/RCTBaseTextInputView.m @@ -596,9 +596,7 @@ RCT_NOT_IMPLEMENTED(- (instancetype)initWithFrame:(CGRect)frame) // These keyboard types (all are number pads) don't have a "Done" button by default, // so we create an `inputAccessoryView` with this button for them. - BOOL shouldHaveInputAccesoryView; - if (@available(iOS 10.0, *)) { - shouldHaveInputAccesoryView = + BOOL shouldHaveInputAccesoryView = ( keyboardType == UIKeyboardTypeNumberPad || keyboardType == UIKeyboardTypePhonePad || @@ -606,15 +604,6 @@ RCT_NOT_IMPLEMENTED(- (instancetype)initWithFrame:(CGRect)frame) keyboardType == UIKeyboardTypeASCIICapableNumberPad ) && textInputView.returnKeyType == UIReturnKeyDone; - } else { - shouldHaveInputAccesoryView = - ( - keyboardType == UIKeyboardTypeNumberPad || - keyboardType == UIKeyboardTypePhonePad || - keyboardType == UIKeyboardTypeDecimalPad - ) && - textInputView.returnKeyType == UIReturnKeyDone; - } if (_hasInputAccesoryView == shouldHaveInputAccesoryView) { return; diff --git a/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputComponentView.mm b/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputComponentView.mm index f23be7a9463..7a7d7e939ce 100644 --- a/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputComponentView.mm +++ b/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputComponentView.mm @@ -174,9 +174,7 @@ using namespace facebook::react; } if (newTextInputProps.traits.textContentType != oldTextInputProps.traits.textContentType) { - if (@available(iOS 10.0, *)) { - _backedTextInputView.textContentType = RCTUITextContentTypeFromString(newTextInputProps.traits.textContentType); - } + _backedTextInputView.textContentType = RCTUITextContentTypeFromString(newTextInputProps.traits.textContentType); } if (newTextInputProps.traits.passwordRules != oldTextInputProps.traits.passwordRules) { diff --git a/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputUtils.mm b/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputUtils.mm index 2540925b3d9..51ead371f74 100644 --- a/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputUtils.mm +++ b/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputUtils.mm @@ -42,10 +42,7 @@ void RCTCopyBackedTextInput( toTextInput.scrollEnabled = fromTextInput.scrollEnabled; toTextInput.secureTextEntry = fromTextInput.secureTextEntry; toTextInput.keyboardType = fromTextInput.keyboardType; - - if (@available(iOS 10.0, *)) { - toTextInput.textContentType = fromTextInput.textContentType; - } + toTextInput.textContentType = fromTextInput.textContentType; if (@available(iOS 12.0, *)) { toTextInput.passwordRules = fromTextInput.passwordRules; @@ -138,11 +135,7 @@ UIKeyboardType RCTUIKeyboardTypeFromKeyboardType(KeyboardType keyboardType) case KeyboardType::WebSearch: return UIKeyboardTypeWebSearch; case KeyboardType::ASCIICapableNumberPad: - if (@available(iOS 10.0, *)) { - return UIKeyboardTypeASCIICapableNumberPad; - } else { - return UIKeyboardTypeNumberPad; - } + return UIKeyboardTypeASCIICapableNumberPad; // Android-only case KeyboardType::VisiblePassword: return UIKeyboardTypeDefault;