I know why this problem is happening but I don’t know how to fix it. I used an override func to add to the method becomeFirstResponder (which does exactly what it says) from the class ViewController to my IBOutlet
autoKeyboard. How do I get this to not be of nil value? Do I give my IBOutlet a value instead of using the “!” ?
What this does: Makes the keyboard pop up automatically instead of tapping on the text field (kind of like in spotlight search on iOS)
Let me know if I need to send more information!
override func becomeFirstResponder() -> Bool {
autoKeyboard.becomeFirstResponder()
return true
}
The error I'm given is:
Thread 1: Fatal error: Unexpectedly found nil while unwrapping an Optional value