Since I have opened my project with xcode 12 I am getting the following issue:
import UIKit
class PersonViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
let imageView = UIImageView()
let carImage = UIImage(named: "carImg")
imageView.image = carImage
}
}
The error I am getting is: "No exact matches in reference to instance method 'image" The compiler is basically not recognising that UIImageView has a property called "image" or that UIKit is not imported.
If I create a new project this compiles just fine, so I am guessing it is some sort of setting that was fine in xcode11 but not fine in xcode12.
Note: This is an Objective C project with a few classes in Swift.
Note: Restarted my mac, did clean project and removed Derived Data