Recording
The first scene was created to let the user choose the video that he/she wanted to edit. Now, we have to create another scene where the user will watch the movie while recording his/her narrative over it.
Add a new file called RecorderViewController.swift
to your project and import UIKit
, AVFoundation
, and Photos
, as shown in the following code:
import UIKit import AVFoundation import Photos
Create a class called RecorderViewController
, which inherits from UIViewController
and implements the AVAudioRecorderDelegate
protocol with the following code:
class RecorderViewController: UIViewController, AVAudioRecorderDelegate {
This scene will have only a view, where the user will watch the movie, and a button to record the audio. Based on this ...
Get Swift 2 Blueprints now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.