 
 extension RecordViewController: AVAudioPlayerDelegate {
     func audioPlayerDidFinishPlaying(player: AVAudioPlayer, successfully flag: Bool) {
-        playButton.setImage(UIImage.init(named: "PlayIcon"), forState: .Normal)
+        playButton.setImage(UIImage(named: "PlayIcon"), forState: .Normal)
     }
 }
            AVNumberOfChannelsKey: 1
        ]
        
        recordFileName = String.init(format: "%li.caf", Int64(NSDate.init().timeIntervalSince1970))
        let recordFileURL = NSURL.init(string: recordFileName!, relativeToURL: documentsPathURL())
        
        recorder?.stop()
        do {
            recorder = try AVAudioRecorder.init(URL: recordFileURL!, settings: recordSetting)
        } catch let error {
            let alertViewController = UIAlertController.init(title: "Warning", message: "Audio Recorder Error", preferredStyle: .Alert)
            alertViewController.addAction(UIAlertAction.init(title: "OK", style: .Default, handler: nil))
            self.presentViewController(alertViewController, animated: true, completion: nil)
            print(error)
            return

        recorder?.prepareToRecord()
        recorder?.meteringEnabled = true
        
        guard audioSession.inputAvailable else {
            let alertViewController = UIAlertController(title: "Warning", message: "Audio input not available", preferredStyle: .Alert)
            alertViewController.addAction(UIAlertAction(title: "OK", style: .Default, handler: nil))
            self.presentViewController(alertViewController, animated: true, completion: nil)
            return
        }
