In my project I\'d like to open iOS built-in Dictionary to find word meaning, or even better, get the meaning of the word directly in my app.
At the
Try with this
func wordIsReal(word: String) -> Bool {
let checker = UITextChecker()
let range = NSMakeRange(0, count(word))
let misspelledRange = checker.rangeOfMisspelledWordInString(word, range: range, startingAt: 0, wrap: false, language: "en_US")
NSLog("misspelledRange:\(misspelledRange)")
NSLog("word:\(word)")
var arrGuessed:NSArray? = checker.guessesForWordRange(misspelledRange, inString: word, language: "en_US")as NSArray!
NSLog("arrGuessed:\(arrGuessed)")
//var correctedStr = textAsNSString.stringByReplacingCharactersInRange(misspelledRange, withString: arrGuessed.objectAtIndex(0) as String)
return misspelledRange.location == NSNotFound
}