Hey, I'm new to coding and trying to deep dive into Xcode and swift by creating an app of my own.
I've got so far but can't work out how to resolve the following error in my code. 'editor placeholder in source file'
Part of code in question..
func textFieldShouldReturn(_ textField: UITextField) -> Bool {
textField.resignFirstResponder()
let newText = textField.text
if let index = textFields.firstIndex(of: textField) {
textFieldStrings[index] = newText // this bit!! //
UserDefaults.standard.set(newText, forKey: textFieldKeys[index])
}
return true
}
Selecting any option will automatically load the page