突出读沿着文字(在iPhone一个童话式的应用程序) [英] Highlight Read-Along Text (in a storybook type app for iPhone)

查看:141
本文介绍了突出读沿着文字(在iPhone一个童话式的应用程序)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我喜欢这个功能(当然,我的儿子喜欢它),我想实现在一个孩子的书应用程序我做的iPhone,但我一无所知从哪里开始。我使用cocos2d的所有动画精灵/过渡的东西,但我不知道如何,因为它叙述接近高亮显示文本。

I love this feature (well, my son loves it), and I would like to implement it in a kid's book app I am doing for iPhone, but I'm clueless where to begin. I'm using Cocos2d for all the animated sprite/transition stuff, but I'm not sure how to approach highlighting text as it is narrated.

例:杰克和吉尔,喝他们填充,太醉去水。作为文本叙述(每一页上的.mp3饰演),文本将被高亮显示。认为我调查的Core Animation,但在这一点上我米更熟悉Cocs2d(云林最好)。

Example: "Jack and Jill, drank their fill, and were too drunk to go for water." As the text is narrated (.mp3 plays on each page), the text would be highlighted. I considered investigating Core animation, but I"m more familiar with Cocs2d at this point (tenuously at best).

如果有人有线索,我真的AP preciate它。

If someone has a clue, I'd really appreciate it.

Brendang

推荐答案

使用的<一个href=\"http://developer.apple.com/iphone/library/documentation/UIKit/Reference/NSString_UIKit_Additions/Reference/Reference.html\"相对=nofollow> <$ C C> UIStringDrawing 方法来决定所需彰显RECT,然后放置一个半透明<$ C $ç>的UIView (或任何cocos2d的使用)的文本视图下。通过的NSTimer

Use the UIStringDrawing methods to determine the rect needed for the highlight, and then position a semitransparent UIView (or whatever cocos2d uses) under your text view. Synchronize with your audio via NSTimer

这篇关于突出读沿着文字(在iPhone一个童话式的应用程序)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆