react-native
react-native copied to clipboard
[iOS] ActivityIndicator incorrectly centered (few pixels off)
Description
I have noticed that the ActivityIndicator is positioned a few pixels off when in a box. (top: approx -1.5 pixels, left: approx -1,5 pixels)
I have tried changing the native code but couldn't figure how to fix this without a hack.

React Native Version
0.71.4
Output of npx react-native info
System: OS: macOS 13.2.1 CPU: (12) arm64 Apple M2 Pro Memory: 941.72 MB / 16.00 GB Shell: 5.8.1 - /bin/zsh Binaries: Node: 16.15.1 - /usr/local/bin/node Yarn: 1.22.5 - /usr/local/bin/yarn npm: 8.11.0 - /usr/local/bin/npm Watchman: 2023.02.13.00 - /usr/local/bin/watchman Managers: CocoaPods: 1.11.2 - /Users/***/.rvm/gems/ruby-2.7.6/bin/pod SDKs: iOS SDK: Platforms: DriverKit 22.2, iOS 16.2, macOS 13.1, tvOS 16.1, watchOS 9.1 Android SDK: Not Found IDEs: Android Studio: 2022.1 AI-221.6008.13.2211.9514443 Xcode: 14.2/14C18 - /usr/bin/xcodebuild Languages: Java: 11.0.15 - /usr/bin/javac npmPackages: @react-native-community/cli: Not Found react: 18.2.0 => 18.2.0 react-native: 0.71.4 => 0.71.4 react-native-macos: Not Found npmGlobalPackages: react-native: Not Found
Steps to reproduce
<View style={{backgroundColor: 'red'}}><ActivityIndicator size="large" color="yellow" /></View>
Snack, code example, screenshot, or link to a repository

:warning: | Newer Version of React Native is Available! |
---|---|
:information_source: | You are on a supported minor version, but it looks like there's a newer patch available. Please upgrade to the highest patch for your minor or latest and verify if the issue persists (alternatively, create a new project and repro the issue in it). If it does not repro, please let us know so we can close out this issue. This helps us ensure we are looking at issues that still exist in the most recent releases. |
I'm seeing the same issue on react-native 0.72.3
I resolved adding the following style to the activity indicator on size large:
{
marginTop: Platform.OS === 'ios' ? 3 : 0,
marginLeft: Platform.OS === 'ios' ? 3 : 0,
}
This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 7 days.
This issue was closed because it has been stalled for 7 days with no activity.
I see the same issue on RN 0.73.6