title: How to get cell index from uiview in uitableviewcell (swift/xcode)
body: <p>I have two <code>UIViewControllers</code> called upVote and downVote in <code>MyTableViewCell</code> class.  I have added the gesture recognizers for tapping these views programmatically but am not sure how to get the parent cell or index of the cell so I know which cell the <code>UIView</code> that was tapped is in.  How do I get the cell or index of the tapped cell in the functions handleTapUp and handleTapDown?</p>
  
  <p>Here is my class</p>
  
  <pre><code>class MyTableViewCell: UITableViewCell {
      // MARK: Properties
  
      @IBOutlet weak var nameLabel: UILabel!
  
      @IBOutlet weak var upVote: UIImageView!
  
      @IBOutlet weak var downVote: UIImageView!
  
      override func awakeFromNib() {
          super.awakeFromNib()
          // Initialization code
  
          let tapUp = UITapGestureRecognizer(target: self, action: "handleTapUp:")
          tapUp.delegate = self
          upVote.addGestureRecognizer(tapUp)
  
          let tapDown = UITapGestureRecognizer(target: self, action: "handleTapDown:")
          tapDown.delegate = self
          downVote.addGestureRecognizer(tapDown)
  
      }
  
      override func setSelected(selected: Bool, animated: Bool) {
          super.setSelected(selected, animated: animated)
  
          // Configure the view for the selected state
  
      }
  
      func handleTapUp(sender: UITapGestureRecognizer? = nil) {
          // handling code
          // get cell(index)
      }
  
      func handleTapDown(sender: UITapGestureRecognizer? = nil) {
          // handling code
          // get cell()
      }
  
  }
  </code></pre>
  
  <p>I have tried self.superclass to get the uitableviewcell, and when i print the debug description it say uitableviewcell, but whenever I try to do anything else with the object I get an error that self.superclass is type AnyObject.  I have tried declaring/casting self.superclass in many different ways and none have worked.  This seems like it should be simple so hopefully I am missing something.</p>