title: IF statement in Objective-C in Xcode
body: <p>In Xcode, I'm trying to make a button that changes it's text, relative to what the text currently is. For example: If the button says "1" and it is pressed, I want the text to change to "2" and "2" to "3" and so forth, here's the snippet of code that's giving me trouble:</p>
  
  <pre><code>if (magicButton.titleLabel = @"1") {
      [magicButton setTitle:@"2" forState:UIControlStateNormal];
  }
  </code></pre>
  
  <p>Xcode gives me this error "Assignment to readonly property" on line one of the snippet. I'm pretty new to Objective-C and iPhone App development, so maybe it's something crazily obvious and simple. Please don't mind if that's the case.</p>
  
  <p>Here's a <a href="http://pastebin.com/vNFB5Xb0" rel="nofollow">paste of my implementation file</a> if it would help at all.</p>
  
  <p>Thanks in advance.</p>