react-native-app-intro icon indicating copy to clipboard operation
react-native-app-intro copied to clipboard

Done button is not working on iOS

Open rohitgoyal opened this issue 8 years ago • 3 comments

Done button doesn't register any TouchableOpacity event like the Skip button on iOS. On Android it works fine. While looking deeper inside the library code it looks like TouchableOpacity is missing when the next button turns into Done button.

return (
    <View style={styles.btnContainer}>
      <Animated.View style={[styles.full, { height: 0 }, {
        opacity: doneFadeOpacity,
        transform: [{
          translateX: skipFadeOpacity.interpolate({
            inputRange: [0, 1],
            outputRange: [0, 20],
          }),
        }],
      }]}
      >
        <View style={styles.full}>
          <Text style={[styles.controllText, {
            color: rightTextColor, paddingRight: 30,
          }]}>
            {doneBtnLabel}
          </Text>
        </View>
      </Animated.View>
      <Animated.View style={[styles.full, { height: 0 }, { opacity: nextOpacity }]}>
        <TouchableOpacity style={styles.full}
          onPress={ isDoneBtnShow ? onDoneBtnClick : onNextBtnClick}>
         <Text style={[styles.nextButtonText, { color: rightTextColor }]}>
          {nextBtnLabel}
        </Text>
        </TouchableOpacity>
      </Animated.View>
    </View>
  )

rohitgoyal avatar Feb 23 '17 10:02 rohitgoyal

@FuYaoDe Can you please have a quick look? Thanks.

rohitgoyal avatar Feb 23 '17 13:02 rohitgoyal

I tried replacing the outer View to Touchable opacity but still nothing. It may have something to do with the animation transtlateX

jasan-s avatar Jun 13 '17 13:06 jasan-s

For my specific case , I didn't need the next button. So Once I remove the following code:

        <TouchableOpacity style={styles.full}
          onPress={ isDoneBtnShow ? onDoneBtnClick : onNextBtnClick}>
         <Text style={[styles.nextButtonText, { color: rightTextColor }]}>
          {nextBtnLabel}
        </Text>
        </TouchableOpacity>
      </Animated.View>

Touchable opacity on the done button worked.

jasan-s avatar Jun 13 '17 13:06 jasan-s