We add the tap listeners of the buttons in the last lines and this will make the buttons perform the corresponding function when tapped.

Step 5: Play Current Song

This code runs when the play button is pressed.

It resets the song and time counters (in case it's not the first time the button is pressed) and plays the song specified by the currentSong variable. After that, the playing variable is set to true, this will play the next or previous song automatically when the next or back buttons are pressed.

Step 7: Next Song

This function stops the current song and changes to the next in the Table, if the playing variable is set totrue it will play it automatically. It also checks if the next song is the last one, if that is the case it goes back to the first in the line.

Step 11: Call the Main Function

In order to initially start the app, the Main function needs to be called. With the above code in place, we’ll do that here:

Main()

Step 12: Loading Screen

The Default.png file is an image that will be displayed right when you start the application while the iOS loads the basic data to show the Main Screen. Add this image to your project source folder, it will be automatically added by the Corona compliler.

Step 13: Icon

Using the graphics you created before you can now create a nice and good looking icon. The icon size for the non-retina iPhone icon is 57x57px, but the retina version is 114x114px and the iTunes store requires a 512x512px version. I suggest creating the 512×512 version first and then scaling down for the other sizes.

It doesn’t need to have the rounded corners or the transparent glare, iTunes and the iPhone will do that for you.

Step 14: Testing in the Simulator

It's time to do the final test. Open the Corona Simulator, browse to your project folder, and then click open. If everything works as expected, you are ready for the final step!

Step 15: Build

In the Corona Simulator go to File > Build and select your target device. Fill the required data and click

build. Wait a few seconds and your app will be ready for device testing and/or submission for distribution!

Conclusion

Experiment with the final result and try to make your custom version of the app!

I hope you liked this tutorial series and find it helpful. Thank you for reading!