Created
May 2, 2019 19:10
-
-
Save standinga/3363834a35e27e949f171e001dcb34d3 to your computer and use it in GitHub Desktop.
ViewController for medium article (1st version)
This file contains hidden or 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 Cocoa | |
class ViewController: NSViewController { | |
private var audioPlayer: AudioPlayer! | |
override func viewDidLoad() { | |
super.viewDidLoad() | |
guard let url = Bundle.main.url(forResource: "z", withExtension: "wav") else { | |
fatalError("can't create url from resource") | |
} | |
audioPlayer = AudioPlayer(url) | |
audioPlayer.play() | |
} | |
override var representedObject: Any? { | |
didSet { | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment