meteor-factory / react-native-tinder-swipe-cards

Tinder-like swipe cards for your React Native app
MIT License
1.13k stars 301 forks source link

Button on card does not work on iPhone 7 #100

Open appsciences opened 7 years ago

appsciences commented 7 years ago

Hello,

I have a button on the card that does not respond to onPress on iPhone 7 only. Code:

import React from 'react'; import { Alert, TouchableWithoutFeedback, StyleSheet, Text, View } from 'react-native'; import SwipeCards from 'react-native-swipe-cards';

export default class App extends React.Component {
  render() {
    return (
      <View style={styles.container}>
          <SwipeCards
              cards={[
                  {text: 'Tomato', backgroundColor: 'red'},
                  {text: 'Aubergine', backgroundColor: 'purple'},
                  {text: 'Courgette', backgroundColor: 'green'},
                  {text: 'Blueberry', backgroundColor: 'blue'},
                  {text: 'Umm...', backgroundColor: 'cyan'},
                  {text: 'orange', backgroundColor: 'orange'},
              ]
              }
              onClickHandler={()=>{}}
              renderCard={(cardData) =>
                  <View><TouchableWithoutFeedback onPress={()=>Alert.alert('stuffs')}>
                      <Text style={{fontSize:26}}>Stuffs</Text></TouchableWithoutFeedback></View>
                  }

              renderNoMoreCards={() => <Text>No more cards</Text>}

              hasMaybeAction
          />
      </View>
    );
  }
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
    backgroundColor: '#fff',
    alignItems: 'center',
    justifyContent: 'center',
  },
});

Any help is highly appreciated.

jkomyno commented 7 years ago

Same for me on Android 7

matsossah commented 6 years ago

hello @appsciences and @jkomyno , did you find a solution? I have the same problem :/ Thanks!