Last active
February 21, 2019 15:42
-
-
Save myrickchow32/289399cdfccadb9a683dada783fce77f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
import AVFoundation | |
class AVFoundataionDemoViewController: BaseViewController { | |
var avSpeechSynthesizer: AVSpeechSynthesizer! | |
override func viewDidLoad() { | |
super.viewDidLoad() | |
avSpeechSynthesizer = AVSpeechSynthesizer() | |
avSpeechSynthesizer.speak(AVSpeechUtterance(string: "Hello world")) | |
} | |
override func viewDidDisappear(_ animated: Bool) { | |
super.viewDidDisappear(animated) | |
print("viewDidDisappear") | |
} | |
deinit { | |
print("AVFoundationDemoViewController is deinit.") | |
} | |
} | |
extension AVFoundataionDemoViewController: AVSpeechSynthesizerDelegate { | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment