             if let cell = tableView.dequeueReusableCellWithIdentifier("Cell") as? WorkoutTableViewCell {
                 let workout  = self.workouts[indexPath.row]
                 let startDate = workout.startDate.relativeDateFormat()
+                
+                if let managedObject = managedObject(workout) {
+                    cell.accessoryType = .Checkmark
+                }
                 
                 cell.startTimeLabel?.text = startDate
                 cell.durationLabel?.text = stringFromTimeInterval(workout.duration)


import UIKit
import HealthKit

class ViewController: UIViewController, UITableViewDelegate, UITableViewDataSource {
    

    var lastRefreshDate: NSDate?
    
    var healthKitAvailable = true
    
    let managedContext = (UIApplication.sharedApplication().delegate as! AppDelegate).managedObjectContext!
    
    var initialAppearance = true

    override func viewDidLoad() {
        super.viewDidLoad()
