AVAudioPlayer can be found in the amework, so you need to add this framework to your project. Using AVAudioPlayer is an easy way to play music on an iOS device. Once you are familiar with the user interface, let’s get started. But if you are running on a device, a tap on that icon will make the media picker appear, so that you can choose a song. This is because the iPhone Simulator doesn’t support accessing the music library. If you’re running in the iPhone Simulator and tap the magnifying glass icon on the bottom left, you’ll see the following warning: Tap on the black area in the middle to hide/show the navigation bar and tool bar. You can tap the play button to switch between play and pause modes but you won’t hear any music until after you’ve added some code. These were taken from the Apple sample project avTouch, and will be explained later on in this tutorial.įirst, extract the downloaded project, open it in Xcode, and build and run. ![]()
0 Comments
Leave a Reply. |