title: Swift- custom UITableViewCell delegate to UIViewController only one protocol works
body: <p>In the application, I have custom protocols that my UIViewController conforms to. I have a custom tableViewCell class and have UIImageView and UITextView in there. I set the cell's delegate to the UIViewController after dequeuing. However only one of the custom protocols makes the callback (imagepicker protocol). </p>
  
  <pre><code>protocol customProtocol1{
      func pickImage(myInt: Int)
  }
  protocol customProtocol2{
      func protocol2 (myInt: Int)
  }
  
  class controller1: UIViewController, UITableViewDelegate, customProtocol1, customProtocol2  {
      func numberOfSectionsInTableView(tableView: UITableView) -&gt; Int {
          return 1
      }
  
      func tableView(tableView: UITableView, numberOfRowsInSection section:Int) -&gt; Int {
          return 3
      }
  
      func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -&gt; UITableViewCell { 
          let cell = tableView.dequeReusableCellWithIdentifier("customCell",    forIndexPath: indexPath) as! CustomTableCellClass
          cell.delegate = self
          return cell
     }
      func pickImage ( myInt: Int){
          print("This line prints")
     }
  
     func protocol2 (myInt: Int){
          print ("This line doesn't print")
  
  
     }
  }
  </code></pre>
  
  <p>And here's the customTableCellClass code:</p>
  
  <pre><code>class CustomTableCellClass: UITableViewCell, UITextFieldDelegate, UITextViewDelegate {
      var imageDelegate: customProtocol1?
      @IBAction func pickImage( sender: AnyObject) {
          imageDelagate?.pickImage(205)
      }
  
      var somethingElseDelegate: customProcotol2?
      @IBActon func clickOnButton( sender: AnyObject) {
          print("this line prints")
          somethingElseDelegate?.protocol2(2)
      }
  
     override func awakeFromNib(){
          super.awakeFromNib()
     }
  }
  </code></pre>
  
  <p>My question is, why does the first protocol get callbacks but second does not?</p>