DictionaryHasDefinitionForTerm problems in xcode 4.5

fourLetterWord = @"isdjfiodjof"; if ([UIReferenceLibraryViewController dictionaryHasDefinitionForTerm:fourLetterWord]) { self.display.text = fourLetterWord; return; } else fourLetterWord = @""; 

This string is accepted. I don't know what I'm doing wrong here, but before 4.5 this worked fine. Is this a problem with xcode 4.5, or is there something wrong with my code?

+4
source share
3 answers

I had the same problem and started working on it. [UIReferenceLibraryViewController dictionaryHasDefinitionForTerm: fourLetterWord]) the method for some reason does not work in the simulator, Apple must fix it.

BUT, if you check your reception in the device [UIReferenceLibraryViewController dictionaryHasDefinitionForTerm: fourLetterWord]), the method starts and gives the correct result.

he's slow though.

Hope helps.

+2
source

dictionaryHasDefinitionForTerm: always returns YES if the dictionary has not been loaded (because if there is no dictionary, it cannot know if the word is in it).

Download is automatically offered when you actually show the popover dictionary in any application. I think the on-demand download feature was introduced in iOS 6 along with dictionaries in languages ​​other than English.

+1
source

My experience is that this works fine on my iPad running iOS 5.1.1, but returns TRUE every time on my iPod running iOS 6.1.3. I registered it as an error with Apple.

Update: omz is right. As soon as I downloaded the Apple dictionary on my iOS6 iPod, it correctly checks the word. It was so long ago that I installed iOS5 on my iPad. I had no memory of whether I installed it manually or if it was done for me. Despite this, this method requires manual installation on iOS6.

0
source

Source: https://habr.com/ru/post/1435563/


All Articles