0

I am trying to use playground to import images so that I can test CIFilters. I am unable to import any images. My image is in the same folder as my playground file. Please see screen shot.

PLAYGROUND CODE:

//: A UIKit based Playground for presenting user interface

import UIKit
import PlaygroundSupport

class myView: UIViewController{


override func viewDidLoad() {
    super.viewDidLoad()

        let image = UIImage.init(named: "scan.jpg")
        let imgView = UIImageView.init(image: image!)
        view.addSubview(imgView)
    }


}

SCREENSHOT:

enter image description here

dean
  • 321
  • 3
  • 17

0 Answers0