Curved bottom on View

前端 未结 4 724
花落未央
花落未央 2020-12-14 12:49

How can i add the curved bottom to a View in react-native? See curved example

I\'f tried to a add an second view like this:

headerBottom: { width: width

4条回答
  •  一生所求
    2020-12-14 13:26

    I don't know whether this is a proper way or not. However this works for me and hope this will help someone.

    
         
             Hello World
         
    
    

    Insert your code to child View

    const styles = StyleSheet.create({
        parent : {
            height : '80%',
            width : '100%',
            transform : [ { scaleX : 2 } ],
            borderBottomStartRadius : 200,
            borderBottomEndRadius : 200,
            overflow : 'hidden',
        },
        child : {
            flex : 1,
            transform : [ { scaleX : 0.5 } ],
    
            backgroundColor : 'yellow',
            alignItems : 'center',
            justifyContent : 'center'
        }
    })
    

提交回复
热议问题