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

UISwipeGestureRecognizer #28

Closed
elifsimit opened this issue Apr 14, 2015 · 1 comment
Closed

UISwipeGestureRecognizer #28

elifsimit opened this issue Apr 14, 2015 · 1 comment

Comments

@elifsimit
Copy link

How can I use UISwipeGestureRecognizer on chartView? I wrote some code but it didn't work.

  • (void)viewDidLoad
    {
    UISwipeGestureRecognizer *swipeRight = [[UISwipeGestureRecognizer alloc] initWithTarget:self action:@selector(slideToRightWithGestureRecognizer:)];
    swipeRight.direction = UISwipeGestureRecognizerDirectionRight;

    [_chartView addGestureRecognizer:swipeRight];
    }

-(void)slideToRightWithGestureRecognizer:(UISwipeGestureRecognizer *)gestureRecognizer{
NSLog(@"here");
}

@danielgindi
Copy link
Collaborator

There was a problem specifically in a PieChart/RadarChart, where after a gesture was cancelled, touches were not restored. That was fixed in the latest commit.

Other than that, UIGestureRecognizers should work, as most gestures are already handled by native UIGestureRecognizers.
You may want to loop the gestureRecognizers array of the view, and modify their properties to allow correctly playing with other conflicting gesture recognizers.

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

2 participants