how to highlight text as it is narrated in iphone - ios

I'm new to Objective C and developing an app which requires I need to highlight the text when it is narrated i.e.
for example consider the below sentence
"A Blue Jackal is dancing in the forest".
when A is narrated it should turn to red and all other words should be black and when Blue is narrated it should be turned to red and all other words will be shown in black.
I have used UILabel for the sentence and my problem is how to find the values of sound position and highlight it accordingly.
Could any one please share code snippet or help me regarding this.
Thanks in advance.

Related

Google Spreadsheet: Display text with game specific commands in separate window/cell

I have a google spreadsheet with different dialog texts which are going to be imported into a game. The game's dialogs use game specific simple emoji-commands that are applied in the game, like "🔴" which gives red color to the next letters and "🔘" which stops the color. Or ⤴️ which enlarges the next letters.
Would it be possible, perhaps using a plugin, to automatically calculate these commands from the cells with the dialogs and display the result in another cell or window?
Something like this:
And would it also be possible to display these texts in front of an image, so that i can see how the texts would fit in the speech bubbles of the game?
Something like this:
Thanks in advance!

How to get a heart filled of black color in katex?

What I know/I tried so far:
\spadesuit or \spades renders spade with filled black color.
Similarly, \clubs or \clubsuit renders club with filled black color.
Now \hearts or \heartsuit just renders heart with white filled bg.
\colorbox treats this as a box/rectangle, thus hiding the shape obviously.
I can get black diamond as \blacklozenge
Please see this in new tab
Also, I get it that club and spade are black and the diamonds and heart are red in a deck, but I want heart symbol in black as well.
How can I get that? Thanks.
Asked on github too : https://github.com/KaTeX/KaTeX/discussions/2546
Credits and thanks to : Ronkok
KaTeX \hearts and \heartsuit render a heart outline, ♡, U+2661, , so they do not help you. The Unicode character for a filled heart is ♥, U+2665. That glyph is not in the KaTeX fonts, but you can still use it and KaTeX will substitute the glyph from the Times New Roman system font.
KaTeX emulates LaTeX, and this is not a LaTeX function, so KaTeX will write at least one error to the console (two if in strict mode). If you don't mind a console error, then no worries. KaTeX does render the heart. Just copy ♥ and paste it into your work.
Until there is any further update, this is what'll we have to work with guys.

Slight FROWNING face unicode in iOS

I want to display slightly FROWNING face in my UILabel and the unicode whihc i am using is \u2639 but that's displaying white frowny face but i needed the yellow one. I checked everywhere but its the same unicode everywhere. could somebody tell me what is the unicode for yellow frowning face?
Edit - Attached is the screenshot for which i am looking for unicode which should be the one which i posted above but that is giving me white frowning face not the yellow one.
The slightly frowny face is U+1F641.
However, let's return to your original question. You are setting the label's text to "\u{2639}" and you are seeing the white frowny face.
The solution is to specify the variant of this glyph, like this: "\u{2639}\u{FE0F}". If you set the label's text to that, you will see the yellow frowny face.
(To understand why that is and what the variation selector means, see https://unicode.org/reports/tr51/#Emoji_Variation_Sequences. Basically, this unicode codepoint falls in the older text area, so if you want the newer emoji variant, you have to ask for it.)
But an even simpler solution is: don't use codepoint values at all! Swift strings are unicode. Just include the emoji directly in your string. Set the label's text to "☹️"! For example:
self.label.text = "☹️"
That way, you will see the emoji you specified in the string.

How are seu control characters bph and sci added to create white and blue text?

How are seu control characters bph and sci added to create white and blue text? Whats the simplest way to do this? Is there a better approach to coloring text when using RDi?
Using Google found a variety of techniques:
How to change color of source lines - midrange.com
Color lines in SEU - Google Groups
Do not use SEU, it was stabilized a v6.1. v6.1 went out of support on 9/30/2015. Instead use RDi which colors source automatically without control codes. In fact, the control codes you use to color SEU text will appear as strange characters in RDi.
Alternatively, https://miworkplace.com/ provides a simpler, less costly UI. But it also automatically colors your code.

objective c - how to make color range from blue to red in steps - programmatically

Using Obj-C, is there a function that can produce color codes that range through the color spectrum in n steps (say 100). The objective is to make UIButtons using these color codes.
I would appreciate ideas on how to proceed. One thought was to take the RGB codes separately and increment each pair.
But perhaps the color codes are in a logical form where I can increment the code in equal steps?
Thanks!

Resources