首页 > 移动平台 > 详细

UIReferenceLibraryViewController:App中字典词义查询的实现

时间:2014-12-24 21:37:06      阅读:319      评论:0      收藏:0      [点我收藏+]

UIReferenceLibraryViewController能够实现在自己的应用中使用字典查询词语的含义.

在使用词典之前,需要用dictionaryHasDefinitionForTerm:方法去判断词典中是否有所选词的解释,如果有,则初始化UIReferenceLibraryViewController展示词语的释义.

    if ([UIReferenceLibraryViewController dictionaryHasDefinitionForTerm:@"English"]) {
        UIReferenceLibraryViewController *reference = [[UIReferenceLibraryViewController alloc] initWithTerm:@"English"];
        [self presentViewController:reference animated:YES completion:nil];
    }

技术分享


UIReferenceLibraryViewController:App中字典词义查询的实现

原文:http://blog.csdn.net/lcl130/article/details/42126919

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!