title: Swift - Multiple Selection from List with Change of Image
body: <p>I am very new to this and have been struggling for some weeks now to come up with a solution to select multiple items from a list. If the image on the left is selected, it selects the line and changes the image to the 'selected' image. If the user clicks on the 'i' it will then segue to a detail screen. I photoshopped the second screen to show what I am trying to achieve...
  Once the relevant items are selected, I will have a submit button to sent those items in a list somewhere... I suppose that I am going to need to use allowsMultipleSelection somewhere and then store the selections into an array and prevent the segue to the detail screen if 'i' is not selected.</p>
  
  <p>Here are screenshots of what I am trying to achieve - <a href="https://dl.dropboxusercontent.com/u/58430376/ios/Screens.png" rel="nofollow">ScreenSamples</a></p>
  
  <p>This is the code that I have used to get the first unselected list... in a class ViewController: UIViewController, UITableViewDataSource.</p>
  
  <pre><code>let repeatList = [("Item 1",    "Sub 1"),
      ("Item 2",  "Sub 2"),
      ("Item 3",  "Sub 3"),
      ("Item 4",  "Sub 4"),
      ("Item 5",  "Sub 5")]
  
  func numberOfSectionsInTableView(tableView: UITableView) -&gt; Int {
      return 1
  }
  
  func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -&gt; Int {
      return repeatList.count
  }
  
  func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -&gt; UITableViewCell {
  
      var cell = tableView.dequeueReusableCellWithIdentifier("cell", forIndexPath: indexPath) as UITableViewCell
      let (repeatProduct, repeatCount) = repeatList[indexPath.row]
  
      cell.textLabel.text = repeatProduct
      cell.detailTextLabel?.text = repeatCount
  
          //retrieve an image
      var repeatSelectorImage = UIImage(named: "checkedIcon")
      cell.imageView.image = repeatSelectorImage
  
          return cell
  }
  
  func tableView(tableView: UITableView, titleForHeaderInSection section: Int) -&gt; String? {
          return "Repeatable Items"
  }
  
  
  override func viewDidLoad() {
      super.viewDidLoad()
      // Do any additional setup after loading the view, typically from a nib.
  
  }
  
  override func didReceiveMemoryWarning() {
      super.didReceiveMemoryWarning()
      // Dispose of any resources that can be recreated.
  }
  </code></pre>