Here I have a pagecontrol which works good but on clicking on dot it doesn\'t change the page so please help in the function of changepage:
- (void)viewDidLo
This is very useful for pagecontrol dots click action change page index for swift 3 and swift 4 .
@IBAction func pageControlSelectionAction(_ sender: UIPageControl) {
let page: Int? = sender.currentPage
var frame: CGRect = self.yourcollectionview.frame
frame.origin.x = frame.size.width * CGFloat(page ?? 0)
frame.origin.y = 0
self.yourcollectionview.scrollRectToVisible(frame, animated: true)
}