Class: UITextChecker
Overview
You use instances of the UITextChecker class to check a string (usually the text of a document) for misspelled words.
Class Method Summary (collapse)
-
+ availableLanguages
Returns the languages for which the text checker’s class can perform spell-checking.
-
+ hasLearnedWord:
Returns whether the text checker has learned the specified word.
-
+ learnWord:
Tells the text checker to learn the specified word so that it is not evaluated as misspelled.
-
+ unlearnWord:
Tells the text checker to unlearn the specified word When a UITextChecker object unlearns a word, it is removed from the dictionary.
Instance Method Summary (collapse)
-
- completionsForPartialWordRange:inString:language:
Returns an array of strings that are possible completions for a partially entered word.
-
- guessesForWordRange:inString:language:
Returns a list of words that are possible valid replacements for a misspelled word.
-
- ignoredWords
Returns the words that the receiver ignores when spell-checking.
-
- ignoreWord:
Tells the receiver to ignore the specified word when spell-checking.
-
- rangeOfMisspelledWordInString:range:startingAt:wrap:language:
Initiates a search of a range of a string for a misspelled word.
-
- setIgnoredWords:
Sets the list of words that the receiver should ignore when it is spell-checking a document.
Methods inherited from NSObject
#!, #!=, #!~, #, #==, #===, #=~, #Rational, #__callee__, #__method__, #__send__, #__type__, `, alloc, allocWithZone:, #autoContentAccessingProxy, autoload, autoload?, autorelease_pool, #awakeAfterUsingCoder:, binding, block_given?, caller, cancelPreviousPerformRequestsWithTarget:, cancelPreviousPerformRequestsWithTarget:selector:object:, catch, class, classFallbacksForKeyedArchiver, #classForCoder, #classForKeyedArchiver, classForKeyedUnarchiver, #clone, conformsToProtocol:, #copy, copyWithZone:, #dealloc, #define_singleton_method, description, display, #doesNotRecognizeSelector:, #dup, #enum_for, #eql?, #equal?, #extend, fail, #finalize, format, #forwardInvocation:, #forwardingTargetForSelector:, framework, #freeze, #frozen?, getpass, gets, global_variables, #init, initialize, #initialize_clone, #initialize_copy, #initialize_dup, #inspect, instanceMethodForSelector:, instanceMethodSignatureForSelector:, #instance_eval, #instance_exec, #instance_of?, #instance_variable_defined?, #instance_variable_get, #instance_variable_set, #instance_variables, instancesRespondToSelector:, isSubclassOfClass:, #is_a?, iterator?, #kind_of?, lambda, load, load_bridge_support_file, load_plist, local_variables, loop, #method, #methodForSelector:, #methodSignatureForSelector:, #methods, #mutableCopy, mutableCopyWithZone:, new, #nil?, open, p, #performSelector:onThread:withObject:waitUntilDone:, #performSelector:onThread:withObject:waitUntilDone:modes:, #performSelector:withObject:afterDelay:, #performSelector:withObject:afterDelay:inModes:, #performSelectorInBackground:withObject:, #performSelectorOnMainThread:withObject:waitUntilDone:, #performSelectorOnMainThread:withObject:waitUntilDone:modes:, print, printf, #private_methods, proc, #protected_methods, #public_method, #public_methods, #public_send, putc, puts, raise, rand, readline, readlines, #replacementObjectForCoder:, #replacementObjectForKeyedArchiver:, require, resolveClassMethod:, resolveInstanceMethod:, #respond_to?, #respond_to_missing?, select, #send, setVersion:, #singleton_methods, sprintf, srand, superclass, #taint, #tainted?, #tap, test, throw, #to_plist, #to_s, trace_var, trap, #trust, #untaint, untrace_var, #untrust, #untrusted?, version
Constructor Details
This class inherits a constructor from NSObject
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class NSObject
Class Method Details
+ (Array) availableLanguages
Returns the languages for which the text checker’s class can perform spell-checking. The languages represented by the strings in the returned array are in user-preference order.
+ (Boolean) hasLearnedWord(word)
Returns whether the text checker has learned the specified word.
+ (Object) learnWord(word)
Tells the text checker to learn the specified word so that it is not evaluated as misspelled. When a UITextChecker object learns a word, it is added to the dictionary. It is global across languages.
+ (Object) unlearnWord(word)
Tells the text checker to unlearn the specified word When a UITextChecker object unlearns a word, it is removed from the dictionary.
Instance Method Details
- (Array) completionsForPartialWordRange(range, inString:string, language:language)
Returns an array of strings that are possible completions for a partially entered word. The strings in the array are in the order they should be presented to the user—that is, more probable completions come first in the array.
- (Array) guessesForWordRange(range, inString:string, language:language)
Returns a list of words that are possible valid replacements for a misspelled word. The strings in the array are in the order they should be presented to the user—that is, more probable guesses come first in the array.
- (Array) ignoredWords
Returns the words that the receiver ignores when spell-checking. The spell checker excludes ignored words as misspelled words during the current spell-checking session only.
- (Object) ignoreWord(wordToIgnore)
Tells the receiver to ignore the specified word when spell-checking. The spell checker excludes ignored words as misspelled words during the current spell-checking session only.
- (NSRange) rangeOfMisspelledWordInString(stringToCheck, range:range, startingAt:startingOffset, wrap:wrapFlag, language:language)
Initiates a search of a range of a string for a misspelled word. To search an entire string or a range within that string, call this method in a loop, resetting startingOffset from each returned range, until you reach the end of the string or specified range within the string.
- (Object) setIgnoredWords(words)
Sets the list of words that the receiver should ignore when it is spell-checking a document. Ignored words are not treated as misspelled words only for the current spell-checking session.