Using the iOS device's microphone to record
In this recipe we will learn how we can use the iOS device's microphone to record sounds.
Following on from our previous recipe, create a new Single View Application, and name it RecorderExample.
How to do it...
To begin, follow these simple steps as outlined in the following order:
- Add a reference to the
AVFoundation.frameworkto your project.
- Select the
ViewController.xibfiles from the Project Navigator window.
- From the Object Library window, select and drag a
UIToolbarobject, and add this to our view and select the Item button located within our toolbar.
- From the Attributes Inspector section, change the Title property to read Start Recording.
- Create the outlet for this