I have table view and in every reusable cell there is a progress bar, now the question is how can i pause and play the progress and its animation if the the button is touched.
var arr = [10 , 20 , 30 , 40]
func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {
let tablecell:TableViewCell = tableView.dequeueReusableCellWithIdentifier("cell") as! TableViewCell
tablecell.tableImage.image = images[indexPath.row]
tablecell.tabelLabel.text = nameUrl[indexPath.row]
let count: Float = Float(arr[indexPath.row])
if flag == false{
tablecell.prog_bar.setProgress(count, animated: true)
} else {
tablecell.prog_bar.setProgress(0, animated: false)
tableView.reloadData()
}
return tablecell
}