我正在尝试将从 Parse 检索到的视频放入 UIimage 中,我需要帮助。我将视频检索为 PFFile 。这是我的代码
func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {
let cell :mineCell = tableView.dequeueReusableCellWithIdentifier("mineCell")as! mineCell
cell.usernameLabel.text = creator[indexPath.row]
videoFile[indexPath.row].getDataInBackgroundWithBlock { (videoData :NSData?, error:NSError?) -> Void in
if videoData != nil{
let video = UIImage(data: videoData!)
cell.videoView.image = video
println("it should the video load in the UImage ")
}
else {
println(error)
}
}
return cell