I have a UIScrollView with 10 pages. I am able to flick between them. I also want to have 2 buttons (a back button and a next button) which when touched will go to the previous or next page. I can't seem to figure out a way to do this though. A lot of my code comes from Apple's page control sample code. Can anybody help?
Thanks
Additional to this code that mjdth added, remember to place it in the viewWillAppear or viewDidAppear.
For Swift 3 this is an extension that I find very convenient:
And you call it like this:
You can do it this way :
First create a UIScrollView extension like:
then just call: