您的位置:首页 > 产品设计 > UI/UE

iOS开发 UIReferenceLibraryViewController(词典)的使用

2017-08-07 15:59 357 查看
UIReferenceLibraryViewController能够实现在自己的应用中使用字典查询词语的含义.

使用:

if ([UIReferenceLibraryViewController dictionaryHasDefinitionForTerm:@"country"]) {
UIReferenceLibraryViewController *refer = [[UIReferenceLibraryViewController alloc] initWithTerm:@"country"];
[self presentViewController:refer animated:YES completion:nil];
} else {
NSLog(@"不支持");
}

方法dictionaryHasDefinitionForTerm:去判断词典中是否有所选词的解释
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息