1. 程式人生 > >react native touchable

react native touchable

 <Button style={{marginTop: 30}}
                        onPress={() => {
                            Alert.alert("你點選了按鈕!");
                        }}
                        onPressIn={() => {
                           
                        }}
                        onPressOut={() => {
                           
                        }}
                        onLongPress={() => {
                            
                        }}
                        title="點我!"
                />

 

<TouchableOpacity
              activeOpacity={0.5}>
<View style={styles.button}>
              <Text ref="event"  style={styles.buttonText}>常用的事件</Text>
            </View>
</TouchableOpacity>

 

TouchableHighlight,
TouchableNativeFeedback,
TouchableWithoutFeedback,
Button,
TouchableOpacity