Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<UIView 0x104908040> `setValue:forUndefinedKey:`]: this class is not **key value coding-compliant** for the key signinbutton.'
I'm getting an error after building and launching my iOS app. I see that other people have got this error before, but after trying all the solutions, none of them have worked for me. It's not a naming issue, or a bad connection, as far as I can tell. I've deleted the app, restarted, etc. I've tried with different outlets. This is how it goes: my app works perfectly, then I add any sort of @IBOutlet
to my ViewController
, all looks good. Build and run, and the app loads to a blank screen and I get that error in my console.
I've been trying every solution on stackoverflow for the past 6 hours. None of them work.
This is my ViewController
.
import UIKit
class UIView: UIViewController {
@IBOutlet weak var signInButton: UIButton!
override func viewDidLoad() {
super.viewDidLoad()
}
}
My AppDelegate
file is just as it comes default.
import UIKit
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
and so on...
Why isn't this working?
EDIT: Changing the class to class HomeViewController: UIViewController
does nothing.
Note: This is not a duplicate question. No solution posted on Stack Overflow has worked so far for me.