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

how to add functionality Next and Previous View in ZlSwipeableView? #87

Open
BhaveshRathod opened this issue May 15, 2017 · 1 comment

Comments

@BhaveshRathod
Copy link

BhaveshRathod commented May 15, 2017

for example first card green color second card white color third card yellow color . so first we swipe right .so now top view is white card after we swipe left so now top view is green card how can it possible

@willsmillie
Copy link

I did it by creating xibs for each card with IBOutlets for the next and previous buttons. Inside of your VC create the following IBActions:

-(IBAction)lastNote:(id)sender{
    currentIndex--;
    [self.swipeableView rewind];
}

-(IBAction)nextNote:(id)sender{
    if (currentIndex >= notes.count) {
        [self dismissViewControllerAnimated:YES completion:nil];
    }else{
        [self.swipeableView swipeTopViewToLeft];
    }
}

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