title: Send Row and Section through Tag in Button Swift
body: <p>I have this inside <strong>cellForRowAtIndexPath</strong></p>
  
  <pre><code>   cell.plusBut.tag = indexPath.row
     cell.plusBut.addTarget(self, action: "plusHit:", forControlEvents: UIControlEvents.TouchUpInside)
  </code></pre>
  
  <p>and this function outside:</p>
  
  <pre><code>func plusHit(sender: UIButton!){
      buildings[sender.tag].something = somethingElse
  }
  </code></pre>
  
  <p>Is it possible to send the <code>indexPath.row</code> <strong><em>and</em></strong> <code>indexPath.section</code>, or some alternative??</p>
  
  <p>Thanks!</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>I approached it like this:</p>
  
  <p><strong>My Custom Button</strong></p>
  
  <pre><code>class MyButton: UIButton{
  
      var myRow: Int = 0
      var mySection: Int = 0
  
  }
  </code></pre>
  
  <p><strong>My Custom Cell</strong></p>
  
  <pre><code>class NewsCell: UITableViewCell{
  
      @IBOutlet weak var greenLike: MyButton!
  </code></pre>
  
  <p><strong>In CellForRowAtIndexPath</strong></p>
  
  <pre><code>    cell.greenLike.myRow = indexPath.row
  </code></pre>
  
  <p>I get an error on this line.</p>