react-native-cube-transition
react-native-cube-transition copied to clipboard
Programmatic transition?
Could you please help me with fully automatic transition (when user clicks some button, for example) ?
@aksonov Sure! I'll try the best I can, I have been outside of RN work for quite some time now but I can try to point you in the right direction
It is even more about iOS animations. I tried to use parts of handlePan, but got reverse ordering of views during transition...
20 июля 2017 г., в 0:40, Thomas Lackemann [email protected] написал(а):
@aksonov Sure! I'll try the best I can, I have been outside of RN work for quite some time now but I can try to point you in the right direction
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.
Finally made it working via emulating of pan gestures via inherited UIPanGestureRecognizer. But it would be great to know how to do it with pure iOS animation..
-(void)moveRight {
OwnPanGestureRecognizer *pan = [[OwnPanGestureRecognizer alloc] init];
[pan setTotalState:UIGestureRecognizerStateBegan];
[self handlePan:pan withTranslation:CGPointMake(-10, 0)];
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 0.2 * NSEC_PER_SEC), dispatch_get_main_queue(), ^{
[pan setTotalState:UIGestureRecognizerStateChanged];
[self handlePan:pan withTranslation:CGPointMake(-120, 0)];
});
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 0.4 * NSEC_PER_SEC), dispatch_get_main_queue(), ^{
[pan setTotalState:UIGestureRecognizerStateChanged];
[self handlePan:pan withTranslation:CGPointMake(-250, 0)];
[pan setTotalState:UIGestureRecognizerStateEnded];
[self handlePan:pan withTranslation:CGPointMake(-250, 0)];
});
}
HI any luck with this? Would love to use this library for a project.. but need ability to programtticaly transition.
@aaggarwa88 Sorry, no progress as this isn't a project that pays the bills for me. You're welcome to read my blog post on how this works and submit a PR.
https://lacke.mn/blog/react-native-experiments-instagram-stories/