I'm very beginner of programming and start studying Swift to make a piano app for fun.
I have a trouble to play a sound when press a button. I've searched some website but I'm too beginner to understand...
http://www.tmroyal.com/playing-sounds-in-swift-avaudioplayer.html http://www.rockhoppertech.com/blog/swift-avfoundation/
Could you please tell me how can I play my "C.m4a" sound when press a "PainoC" button?
Here is my "view controller.swift".
import UIKit
class ViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
}
@IBAction func PianoC(sender: AnyObject) {
}
}