我正在构建react本机项目。 这段程式码在Android上运作良好,但在ios上却无法正常运作。 如果我触摸按钮的前半部分,它可以工作,但触摸按钮的末尾则不起作用。
<View style={{backgroundColor: 'red', position: 'absolute', bottom: 0, alignSelf: 'center', width: 300}}>
<TouchableOpacity onPress={()=>{console.log('clicked!');}>
<View style={{flex: 1, backgroundColor: 'blue', width: 300}}>
<Text style={{flex: 1, backgroundColor: 'green', width: '100%', textAlign: 'center'}}>
Click Me!
</Text>
</View>
</TouchableOpacity>
</View>