我正在尝试为 IOS 制作一个填字游戏应用程序,但我不知道如何检查字符串是否是有效的英文单词。
我如何检查它。 是否有任何 API 或在线工具来检查它。 提前致谢
最佳答案
在 iOS5 中使用 UIReferenceLibraryViewController
类的 +dictionaryHasDefinitionForTerm:
方法很容易做到。
A UIReferenceLibraryViewController object provides a dictionary service to look up the definition of terms. You create and initialize a reference library view controller using the initWithTerm: method. You pass the term to define as the parameter to this method and the definition is displayed. You can present this view controller modally or as part of another interface. On iPad, you can set the reference library view controller as the content view controller of a UIPopoverController object. Optionally, use the dictionaryHasDefinitionForTerm: class method to check if a definition is available for a given term before creating an instance—for example, use this method if you want to change the user interface depending on whether a definition is available.
关于iphone - 如何检查一个词是否在 cocoa touch 的英语词典中定义?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8008458/