title: How to hide and display checkmark on cell when UITableViewCell tapped?
body: <p>I'm working on a UITableView that acts like checklist. I need to display checkmark when <code>UITableViewCell</code> tapped and hide the checkmark when UITableViewCell tapped again. I've tried <a href="https://stackoverflow.com/questions/30059704/uitableviewcell-checkmark-to-be-toggled-on-and-off-when-tapped-swift">this</a> solution but I couldn't build because of <code>var checked = [Bool]()</code> part. How can I solve it with another way?</p>
  
  <p><strong>EDIT</strong>
  I've added the code below to cellForRowAtIndexPath</p>
  
  <pre><code>if checked == true {
              cell.accessoryType = .None
              checked = false
          } else if checked == false {
              cell.accessoryType = .Checkmark
              checked = true
          }
  </code></pre>