         
         cell.textLabel?.text = shiftlist[indexPath.row]
         
+        if(selectedCells[indexPath.row]){
+            cell.accessoryType = UITableViewCellAccessoryType.Checkmark
+        }else{
+            cell.accessoryType = UITableViewCellAccessoryType.None
+        }
         return cell
     }
     

                let historydate = DBmethod().ShiftImportHistoryDBGet()[i].date
                let historyname = DBmethod().ShiftImportHistoryDBGet()[i].name
                shiftlist.append(historydate + "   " + historyname)
            }
        }
        

    func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath) {
        let cell = tableview.cellForRowAtIndexPath(indexPath)
        cell?.accessoryType = UITableViewCellAccessoryType.Checkmark
        
        selectedCells[indexPath.row] = true
    }
    
    //セルの選択が解除された時に呼ばれる
    func tableView(tableView: UITableView, didDeselectRowAtIndexPath indexPath: NSIndexPath) {
        let cell = tableview.cellForRowAtIndexPath(indexPath)
        cell?.accessoryType = UITableViewCellAccessoryType.None
        
        selectedCells[indexPath.row] = false
    }
}
