Closed alexbartisro closed 7 years ago
In setSearchText you raise the amplitude to 5.0 and then change it back to 1.0 which I'm assuming is how you want to display the spike. But these commands will be executed way too quickly resulting in you not seeing any visible change in the amplitude.
I would recommend you introduce a delay between these two changes by moving the last two lines to a different function and then setting up a timer in setSearchText to call this new function. Also call setNeedsDisplay at the end of setSearchText. This will force the view to start displaying the new amplitude and then after a certain delay, your new function should kick it and set your amplitude back to normal.
@alankarmisra yep. Did it like you said. Came out pretty ok. Thank you!
Hello,
I have it implemented based on your sample app, and it looks great. Now I want to show a spike when I get a callback from ios's speech recognition api.
So my animation is now based on
and in my callback I receive a string which is the word the user said
The thing is that it doesn't do much. The animation change is barely visible.
In my
viedDidLoad
my setup isAny idea how can I achieve this? Thanks!