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

Button to scroll to viewcontroller #8

Open
devJoshLopez opened this issue Aug 12, 2016 · 4 comments
Open

Button to scroll to viewcontroller #8

devJoshLopez opened this issue Aug 12, 2016 · 4 comments

Comments

@devJoshLopez
Copy link

I have a button on the "middle" vc that should take the user to the "right" vc. Using a segue makes the swiping stop working. How would I scroll to the second vc with a button? The same functionality can be seen on snapchat where the bottom right button on the main vc takes you to the stories vc.

@ghost
Copy link

ghost commented Oct 6, 2016

@devJoshLopez You need to set the contentOffSet of the scrollview and animate it. Then I simply post notifications from my viewcontroller to change the content offset of the scroll view :)

@jakespracher
Copy link
Owner

^yep I agree. I suppose I could implement this and make it optional, but I left it out initially since some people may not want this behavior and its not too difficult to add

@WayneEld
Copy link

WayneEld commented Jul 4, 2017

Correct you can post a notification from your middle view controller to either the SnapContainerViewController or the VerticalScrollViewController (that contains the notification observer on the scroll view set up). You can then set the content off set for the scroll view as @danieldelouya said.

@PranavMadanahalli
Copy link

@danieldelouya could you post your solution here! :)

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

4 participants