I saw this feature in many children apps where the word magnified when the reader read it. i want to know how it was achieved in swift here is an example:
I have no idea what I've to seach for to learn about it
I saw this feature in many children apps where the word magnified when the reader read it. i want to know how it was achieved in swift here is an example:
I have no idea what I've to seach for to learn about it
It's hard to be sure. in the example you linked it looks like it's drawing a highlighing rectangle with a drop shadow behind the text rather than magnifying it.
You could use attributed strings (NSAttributedString
) to highlight each word in bold, for example. I'm not sure how you would synchronize the highlighting with the spoken text however. You might need to create an array of time indexes for the time when the audio begins speaking each word in the text, along with a range for each word to be highlighted. You could then apply bolding (or other styling changes) to one word at a time as each time index passes.
If you wanted to use a highlighting box as in the video you'd probably have to use CoreText. This link should get you started, but be warned that CoreText is complicated. It is not a beginner framework.