码迷,mamicode.com
首页 > 移动开发 > 详细

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

时间:2014-12-24 21:39:52      阅读:287      评论: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
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!