title: Xcode 6- SWIFT- Cast CMTime as Float
body: <pre><code>var songs = MPMediaQuery()
  var localSongs = songs.items
  songList = NSMutableArray(array: localSongs)
  
  tableView.reloadData()
  
  var song = MPMediaItem(coder: songList[0] as NSCoder)
  
  var currentItem = AVPlayerItem(URL: song.valueForProperty(MPMediaItemPropertyAssetURL) as NSURL)
  
  player.replaceCurrentItemWithPlayerItem(currentItem)
  
  player.play()
  
  var songTitle: AnyObject! = song.valueForProperty(MPMediaItemPropertyTitle)
  
  songName.text = songTitle as? String
  
  sliderOutlet.value = Float(player.currentTime()) // &lt;&lt;-Error here
  </code></pre>
  
  <p>I'm building a music player and I want a slider to show the duration of the song, but I get this error </p>
  
  <blockquote>
    <p>Could not find an overload for 'init' that accepts the supplied arguments</p>
  </blockquote>
  
  <p>I think the problem is converting CMTime to Float. </p>