I followed the instructions in Customizing QuickType Suggestions in iOS. I get a crash with error
setAutocompleteWithDataSource:delegate:customize:]: unrecognized selector sent to instance 0x7fe8c981bc00'
The relevant code is simply:
@IBOutlet weak var brand: UITextField!
override func viewDidLoad() {
super.viewDidLoad()
. . .
self.brand.setAutocompleteWith(self, delegate: self, customize: { inputView in
inputView?.isHidden = false
})
}
I'm using Xcode 9.1, and swift 3. I don't grok the syntax for closures when used with objective C. Can you see my error?
Note that I added the context of the call to setAutocompleteWith. Is viewDidLoad() a good place do do the call?