How To Use UIScrollView In Swift
o to the ViewController.swift file and add the follwing properties var imageView: UIImageView! var scrollView: UIScrollView! override func viewDidLoad() { super.viewDidLoad() // 1 imageView = UIImageView(image: UIImage(named: "strandvagen.jpg")) // 2 scrollView = UIScrollView(frame: view.bounds) scrollView.backgroundColor = UIColor.blackColor() // 3 scrollView.contentSize = imageView.bounds.size // 4 scrollView.addSubview(imageView) view.addSubview(scrollView) } class ViewController: UIViewController, UIScrollViewDelegate { @IBOutlet var scrollView: UIScrollView! var imageView: UIImageView! override func viewDidLoad() { super.viewDidLoad() // 1 let image = UIImage(named: "photo1.png")! imageView = UIImageView(image: image) imageView.frame = CGRect(origin: CGPoint(x: 0, y: 0), size:image.size) ...