Skip to content

Commit 2b23bf7

Browse files
authored
fix: scrollview padding top inconsistency (#26)
1 parent e5705cd commit 2b23bf7

File tree

4 files changed

+10
-3
lines changed

4 files changed

+10
-3
lines changed

example/ios/Podfile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,13 @@ target 'example' do
6767
)
6868
__apply_Xcode_12_5_M1_post_install_workaround(installer)
6969

70+
installer.pods_project.targets.each do |target|
71+
target.build_configurations.each do |config|
72+
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = "13.0"
73+
config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= ['$(inherited)', '_LIBCPP_ENABLE_CXX17_REMOVED_UNARY_BINARY_FUNCTION']
74+
end
75+
end
76+
7077
# This is necessary for Xcode 14, because it signs resource bundles by default
7178
# when building for devices.
7279
installer.target_installation_results.pod_target_installation_results

example/ios/Podfile.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -724,6 +724,6 @@ SPEC CHECKSUMS:
724724
RNSVG: 53c661b76829783cdaf9b7a57258f3d3b4c28315
725725
Yoga: 79dd7410de6f8ad73a77c868d3d368843f0c93e0
726726

727-
PODFILE CHECKSUM: 675d5c47e1336b7b792d33fad9d8fbf19b97d359
727+
PODFILE CHECKSUM: 7d17b32e481e08392125f8ca365d4f9ddd000f1d
728728

729729
COCOAPODS: 1.12.1

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,6 @@
9292
"engines": {
9393
"node": ">= 16.0.0"
9494
},
95-
"packageManager": "^yarn@1.22.15",
9695
"jest": {
9796
"preset": "react-native",
9897
"modulePathIgnorePatterns": [

src/components/containers/ScrollView.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ const ScrollViewWithHeadersInputComp = (
6868
debouncedFixScroll,
6969
absoluteHeaderHeight,
7070
onAbsoluteHeaderLayout,
71+
scrollViewAdjustments,
7172
} = useScrollContainerLogic({
7273
scrollRef,
7374
largeHeaderShown,
@@ -112,10 +113,10 @@ const ScrollViewWithHeadersInputComp = (
112113
if (onMomentumScrollEnd) onMomentumScrollEnd(e);
113114
}}
114115
contentContainerStyle={[
116+
scrollViewAdjustments.contentContainerStyle,
115117
// @ts-ignore
116118
// Reanimated typings are causing this error - will fix in the future.
117119
contentContainerStyle,
118-
absoluteHeader ? { paddingTop: absoluteHeaderHeight } : undefined,
119120
]}
120121
automaticallyAdjustsScrollIndicatorInsets={
121122
automaticallyAdjustsScrollIndicatorInsets !== undefined

0 commit comments

Comments
 (0)