Here is my code:
import UIKit
class ViewController: UIViewController {
@IBOutlet var button: UIButton
override func viewDidLoad() {
super.viewDidLoad()
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
}
}
This is a simple IBOutlet (straight from Apple developer docs). This gives me the error "IBOutlet property" has the optional type "UIButton", and I have no idea how to fix it.
source
share