How to create a Scroll View with a page control using swift? [closed]
import UIKit class DummyVC: UIViewController, UIScrollViewDelegate { let scrollView = UIScrollView(frame: CGRect(x:0, y:0, width:320,height: 300)) var colors:[UIColor] = [UIColor.red, UIColor.blue, UIColor.green, UIColor.yellow] var frame: CGRect = CGRect(x:0, y:0, width:0, height:0) var pageControl : UIPageControl = UIPageControl(frame: CGRect(x:50,y: 300, width:200, height:50)) override func viewDidLoad() { super.viewDidLoad() configurePageControl() scrollView.delegate = self scrollView.isPagingEnabled = true self.view.addSubview(scrollView) for index … Read more