My app is supposed to change the image file of a UIImage with a button push.
Then a sound file is supposed to play.
But the screen doesn't update until the sound file is finished playing.
Any suggestions would be greatly appreciated.
I've tried adding a delay, but I can't get this to work right.
This sounds (no pun intended) like you have not multi-threaded the code for playing the sound and changing the image. Hence your display is not updating until the sound has finished and the run loop can update the display.
Have you implemented a [audioPlayer prepareToPlay]; before hand?, I've noticed a slight "glitch in the matrix" when you try to play the sound for the first time.
Can you preempt the file to play? e.g. doing it at running at viewdidload?
btw...is the image in the button or somewhere else?