title: swift 2.1 table view controller segue to view delegate errors with unexpectedly found nil
body: <p>Ive research this and i'm pretty sure this is the correct way but I keep getting</p>
  
  <pre><code> fatal error: unexpectedly found nil while unwrapping an Optional value
  </code></pre>
  
  <p>on the prepareForSegue line</p>
  
  <pre><code> selectSingleVC!.delegate = self
  </code></pre>
  
  <p>The relevant bits of code are here. I'm not sure why the nil is there and its driving me mad :-)</p>
  
  <pre><code>class FriendsChatViewController: UITableViewController, UIActionSheetDelegate, SelectSingleViewControllerDelegate, SelectMultipleViewControllerDelegate {
  
  ...
  
  @IBAction func compose(sender: UIBarButtonItem) {
  
  weak var wself: FriendsChatViewController? = self
  
  let action = UIAlertController(title: nil, message: nil, preferredStyle: UIAlertControllerStyle.ActionSheet)
  
  let cancelAction = UIAlertAction(title: "Cancel", style: UIAlertActionStyle.Cancel) { _ in
  }
  
  let singleAction = UIAlertAction(title: "Single recipient", style: UIAlertActionStyle.Default) { _ in
      if let _ = wself {
          self.performSegueWithIdentifier("selectSingleSegue", sender: self)
  
      }
  }
  
  let multipleAction = UIAlertAction(title: "Multiple recipients", style: UIAlertActionStyle.Default) { _ in
      if let _ = wself {
         self.performSegueWithIdentifier("selectMultipleSegue", sender: self)
  
      }
  }
  
  
  action.addAction(cancelAction)
  action.addAction(singleAction)
  action.addAction(multipleAction)
  
  self.presentViewController(action, animated: true, completion: nil)
  
  }
  
  ...
  
      override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) {
      if segue.identifier == "messagesChatSegue" {
          let chatVC = segue.destinationViewController as! ChatViewController
          //chatVC.hidesBottomBarWhenPushed = true
          let groupId = sender as! String
          chatVC.groupId = groupId
      } else if segue.identifier == "selectSingleSegue" {
          let selectSingleVC = segue.destinationViewController as? SelectSingleViewController
          print(self)
          selectSingleVC!.delegate = self  &lt;-- ERROR is here
      } else if segue.identifier == "selectMultipleSegue" {
          let selectMultipleVC = segue.destinationViewController as? SelectMultipleViewController
          selectMultipleVC!.delegate = self
      }
  
  }
  </code></pre>
  
  <p>This is relevant sections of my SelectSingleViewController</p>
  
  <pre><code>protocol SelectSingleViewControllerDelegate {
  func didSelectSingleUser(user: PFUser)
  }
  
  class SelectSingleViewController: UITableViewController, UISearchBarDelegate {
  
  var friends = [PFObject]()
  var user = PFUser()
  var delegate: SelectSingleViewControllerDelegate!
  
  ...
  
  override func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath) {
      tableView.deselectRowAtIndexPath(indexPath, animated: true)
      self.dismissViewControllerAnimated(true, completion: { () -&gt; Void in
          if self.delegate != nil {
              let friendObject = self.friends[indexPath.row]
              let friend = friendObject["user"] as! PFUser
              self.user = friend
  
              print(self.user)
              self.delegate.didSelectSingleUser(self.user)
  
          }
      })
  }
  </code></pre>
  
  <p>Ive been racking my brain on this for hours and need some assistance in my error. Thanks</p>