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 previ
func changePage(pageControl: UIPageControl) { let page = CGFloat(pageControl.currentPage) var frame = self.scrollView.frame frame.origin.x = frame.size.width * page frame.origin.y = 0 self.scrollView.scrollRectToVisible(frame, animated: true) }