title: Using tags in Swift
body: <p>I have about 15 UIButtons in my controller. Im trying to clear 10 of them with a simple for loop and looks like I am getting some kind of conflict.</p>
  
  <p>When I hit the button to clear, I get the following error:</p>
  
  <blockquote>
    <p>Could not cast value of type '_UISizeTrackingView' (0x18a023c) to 'UIButton' (0x1899298).
    (lldb) </p>
  </blockquote>
  
  <p>For loop is :</p>
  
  <pre><code>for var i = 0; i &lt; 9; i++ {
      button = view.viewWithTag(i) as! UIButton
      button.setImage(nil, forState: .Normal)
  }
  </code></pre>
  
  <p>I have narrowed it down to an issue with an item that is using tag 0.  I have looked at all the items on my View Controller Scene and can not seem to find any conflicts. I only see the one button using tag = 0.</p>
  
  <p>I even confrimed it by replacing the 'i' in the loop with '0' and got the same issue.  When I replaced it with a '1' or a '2', works fine with that single image.</p>
  
  <p>Any way to see what object is using the tag 0?  I have clicked on them all ( including the main 'View') but cant seem to find anything.</p>