Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

implement the same behavior as Android api #1418

Closed
L-Jovi opened this issue Sep 8, 2016 · 7 comments
Closed

implement the same behavior as Android api #1418

L-Jovi opened this issue Sep 8, 2016 · 7 comments

Comments

@L-Jovi
Copy link

L-Jovi commented Sep 8, 2016

like android gesture of LongPressed effect, I don't know the same implement in our side by swift.

please notice this link.
void onChartLongPressed(MotionEvent me);

thanks for your time.

regards :)

@pmairoldi
Copy link
Collaborator

What is the behaviour of long pressing on the android version?

@L-Jovi
Copy link
Author

L-Jovi commented Sep 9, 2016

the master branch at latest.

@pmairoldi
Copy link
Collaborator

pmairoldi commented Sep 9, 2016

There is no long press right now. What does the android version do when you long press?

@L-Jovi
Copy link
Author

L-Jovi commented Sep 9, 2016

@petester42 thanks for your reply,

I want to resolve conflict of gesture, now I put our smart chart inside react-native-swiper as one slide,

and I want to implement that when I longPress at chart component, then sliding horizontally just trigger chart's behaviour while the whole slide tab don't be triggered.

@pmairoldi
Copy link
Collaborator

You could possibly do this with the UIGestureRecognizerDelegate but I'm not really sure what you want to achieve.

I'm also unsure what you want from us. You want ChartViews to have a UILongPressGestureRecognizer?

@L-Jovi
Copy link
Author

L-Jovi commented Sep 9, 2016

thanks for your patience.

I think UILongPressGestureRecognizer is what I need as the same behaviour in Android side,
I want to display x axis and y axis value when user longPress on chart component and sliding horizontally,

but now if I do it, the event of gesture will be captured from react-native-swiper component, the whole slide tab will be changed.

@danielgindi
Copy link
Collaborator

You actually should use a UILongPressGestureRecognizer.
That's how it's done in iOS. In Android you need to subclass, so a special listener is provided. In iOS you control the whole gesture experience with ease.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants