Getting rustily back into iOS programming after some years away and am having trouble setting up a UISwitch. Here's my code:
@IBOutlet weak var firstConjugationVerbSwitch: UISwitch!
override func viewDidLoad() {
super.viewDidLoad()
view.addSubview(scrollView)
firstConjugationVerbSwitch.addTarget(self, action: #selector(changeText), for: .valueChanged)
}
@objc func changeText() {
print("changeText function running.")
}
The error I get when I toggle the switch is
[Latin_Substitution_Drills.VerbOptionsViewController firstConjugationVerbSwitch:]: unrecognized selector sent to instance 0x7ffcea817600
Any thoughts about what I'm doing wrong?