Skip to content

Instantly share code, notes, and snippets.

@anatooly
Created October 11, 2022 08:49
Show Gist options
  • Save anatooly/c9f1553e773662bbd6f8e9c500aa5dc9 to your computer and use it in GitHub Desktop.
Save anatooly/c9f1553e773662bbd6f8e9c500aa5dc9 to your computer and use it in GitHub Desktop.
ArbitrarySizeViewIos
import React from 'react'
import {View, Platform} from 'react-native'
const ARBITRARY_SIZE = 1000
const ArbitrarySizeViewIos = (props) => {
if (Platform.OS !== 'ios') return null
const backgroundColor = props?.backgroundColor
return (
<View
style={{
backgroundColor,
height: ARBITRARY_SIZE,
position: 'absolute',
top: -ARBITRARY_SIZE,
left: 0,
right: 0,
}}
/>
)
}
export default ArbitrarySizeViewIos
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment