I am not sure as to how to use the requestSupplementaryLexiconWithCompletion as outlined on the Apple Developer site here.
I have the following function
override func requestSupplementaryLexiconWithCompletion(completionHandler: ((UILexicon!) -> Void)!) {
appleLexicon = UILexicon
}
I am just lost as how to get a the UILexicon, then look at the pair values returned. E.g print them to the console to see its output.
You can try to use it like:
func handler(lexicon: UILexicon!) {
println(lexicon.description)
}
@IBAction func click(sender: AnyObject) {
let controller = UIInputViewController()
controller.requestSupplementaryLexiconWithCompletion(handler)
}
Or like:
@IBAction func click(sender: AnyObject) {
let controller = UIInputViewController()
controller.requestSupplementaryLexiconWithCompletion({
lexicon in
println(lexicon.description)
})
}
click method is just a UIButton tap event handler
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With