react-native

React Native state update during animation “resets” the animation

余生长醉 提交于 2021-02-20 02:47:36
问题 I am facing a problem that I've tried to solve in lots of different ways, but I cannot get it to work. Please see this Expo application, I've created a dumb example that demonstrates my problem: https://snack.expo.io/HJB0sE4jS To summarize, I want to build an app with a draggable component (The blue dot in the example), but while the user drags the component I also need to update the state of the app (the counter in the example). The problem is that whenever the state updates during dragging,

React Native elevation StyleSheet not working in FlatList

旧巷老猫 提交于 2021-02-20 00:49:03
问题 I'm trying to style my renderItem in FlatList but elevation not working properly. Is there anything I'm wrong or this is a React Native issue? I tested ListView too but it still not working properly This is TodoItem component import React, { Component } from 'react' import { Text, View, StyleSheet } from 'react-native' const styles = StyleSheet.create({ container: { height: 60, backgroundColor: 'white', borderRadius: 10, shadowColor: '#000', shadowOffset: { width: 2, height: 2 },

React Native elevation StyleSheet not working in FlatList

北战南征 提交于 2021-02-20 00:48:16
问题 I'm trying to style my renderItem in FlatList but elevation not working properly. Is there anything I'm wrong or this is a React Native issue? I tested ListView too but it still not working properly This is TodoItem component import React, { Component } from 'react' import { Text, View, StyleSheet } from 'react-native' const styles = StyleSheet.create({ container: { height: 60, backgroundColor: 'white', borderRadius: 10, shadowColor: '#000', shadowOffset: { width: 2, height: 2 },

React Native elevation StyleSheet not working in FlatList

你离开我真会死。 提交于 2021-02-20 00:45:46
问题 I'm trying to style my renderItem in FlatList but elevation not working properly. Is there anything I'm wrong or this is a React Native issue? I tested ListView too but it still not working properly This is TodoItem component import React, { Component } from 'react' import { Text, View, StyleSheet } from 'react-native' const styles = StyleSheet.create({ container: { height: 60, backgroundColor: 'white', borderRadius: 10, shadowColor: '#000', shadowOffset: { width: 2, height: 2 },

React Native elevation StyleSheet not working in FlatList

隐身守侯 提交于 2021-02-20 00:44:03
问题 I'm trying to style my renderItem in FlatList but elevation not working properly. Is there anything I'm wrong or this is a React Native issue? I tested ListView too but it still not working properly This is TodoItem component import React, { Component } from 'react' import { Text, View, StyleSheet } from 'react-native' const styles = StyleSheet.create({ container: { height: 60, backgroundColor: 'white', borderRadius: 10, shadowColor: '#000', shadowOffset: { width: 2, height: 2 },

Can't update pods to the latest version

血红的双手。 提交于 2021-02-20 00:22:31
问题 I'm using react-native and I am trying to update the pods by using pod update But it updates nothing. However, when I use pod outdated It shows this Updating spec repo `master` $ /usr/bin/git -C /Users/IG/.cocoapods/repos/master fetch origin --progress remote: Counting objects: 15, done. remote: Compressing objects: 100% (14/14), done. remote: Total 15 (delta 11), reused 0 (delta 0), pack-reused 0 From https://github.com/CocoaPods/Specs 1bb3a72da66..f6d4f6f0e14 master -> origin/master $ /usr

Can't update pods to the latest version

匆匆过客 提交于 2021-02-20 00:16:15
问题 I'm using react-native and I am trying to update the pods by using pod update But it updates nothing. However, when I use pod outdated It shows this Updating spec repo `master` $ /usr/bin/git -C /Users/IG/.cocoapods/repos/master fetch origin --progress remote: Counting objects: 15, done. remote: Compressing objects: 100% (14/14), done. remote: Total 15 (delta 11), reused 0 (delta 0), pack-reused 0 From https://github.com/CocoaPods/Specs 1bb3a72da66..f6d4f6f0e14 master -> origin/master $ /usr

In React Native, how can I get the Y offset of a custom component and then scroll a ScrollView to its position?

倾然丶 夕夏残阳落幕 提交于 2021-02-19 09:13:47
问题 In React Native, I have a screen with a ScrollView : let scrollView; let myComponent2; function onPress() { myComponent2.measure((frameOffsetX, frameOffsetY, width, height, pageOffsetX, pageOffsetY) => { scrollView.scrollTo({ y: frameOffsetY }); } function MyScrollView() { return ( <ScrollView ref={ref => scrollView = ref}> <MyButton onPress={onPress} /> <MyComponent1 /> <MyComponent2 ref={ref => myComponent2 = ref} /> <MyComponent3 /> </ScrollView> ); }; And MyButton is defined like this:

Xcode throws 'atomic_notify_one<unsigned long>' is unavailable

拟墨画扇 提交于 2021-02-19 08:59:49
问题 I installed Xcode 12 on my Mac, tried building my react native app that runs perfectly on android, and get 'atomic_notify_one<unsigned long>' is unavailable . This is the most information I get from the error. 回答1: This error was an error from flipper. Flipper threw several more less descriptive errors that I had to comment it on my podfile. After commenting, this error stopped. 来源: https://stackoverflow.com/questions/66189325/xcode-throws-atomic-notify-oneunsigned-long-is-unavailable

iOS 11 Location permission with three options from the beginning

こ雲淡風輕ζ 提交于 2021-02-19 07:53:47
问题 I am trying to ask for location permission on iOS 11 with React Native. There is a change from Apple coming with iOS 11 where we have a third option for using the location permission only when using the app. Our app is location based and need the user's coordinates even when the app is in the background so I would like the user to have the option to click 'Always' the first time the popup shows up. The problem is that the only popup which shows up is not having the three options (the first