My code is to display image.jpg in a window. That was written in Swift 3. Recently, I updated to Swift 4 with Xcode 10.2 . It doesn't work at all. I also rewrote it in Swift 5. It still doesn't work. I had to download the old Xcode 10 in order to run my code in Swift 3 to work again. I wonder what happened to the code.
Here is my main code to display the picture.
override func viewDidAppear() {
super.viewDidAppear()
imageView.image = NSImage(byReferencingFile: "\(ViewController.GlobaVariable.selecFile)" )
print("\(ViewController.GlobaVariable.selecFile)")
/// The print statement work but not the image.
}