title: Select and Deselect UITableView Rows
body: <p>I have TableView with multiple rows, I am selecting them and adding them to the Label text when i deselect any of the row I am unable to remove it from Label Text</p>
  
  <p>Here's My Code:</p>
  
  <pre><code>func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -&gt; UITableViewCell {
  
          if tableView == categoryTable
          {
          let cell = self.categoryTable.dequeueReusableCellWithIdentifier("categoryCell") as! InquiryCategoryTableViewCell
  
          let Category:CategoryDB = categoryData.objectAtIndex(indexPath.row) as! CategoryDB
          print("Category = \(Category.category)")
  
              cell.categoryName.text = "\(Category.category)"
              cell.tintColor = color.UIColorFromRGB(0xCEEBFF)
              categoryTable.allowsMultipleSelectionDuringEditing = true
              categoryTable.setEditing(true, animated: false)
  
  
  
          return cell
          }
  }
  
  func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath) {
  
          if tableView == categoryTable
          {
              categoryList = categoryData[indexPath.row] as! CategoryDB
  
              self.category_id = categoryList!.catg_id
  
  
  
              print("Name = \(categoryList!.category)")
              print("ID = \(self.category_id)")
              categoryLabel.text! += "\(categoryList!.category), "
          }
  }
  </code></pre>
  
  <p>Here's What i get as Output:</p>
  
  <p><a href="https://i.stack.imgur.com/e6Hto.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/e6Hto.png" alt=""></a></p>
  
  <p>I first selected 3 rows it got appended to <strong><em>Label.text</em></strong> and after i deselect the row <strong><em>Label.text</em></strong> remains same</p>
  
  <p>Anyone who can help me in this code?</p>