title: How can I replace increment operators when using NSInteger and int properties
body: <p>I am updating some old code to our new coding standards. In this code, the <code>int</code> variable was incremented with the old <code>++</code> operator. Now, the <code>int</code> variable is a property so using <code>++</code> isn't working so well. I'm not supposed to use dots and I'm not supposed to reference ivars directly.<br>
  Here is what I have come up with (totalHeads is the property of type <code>int</code>):<br>
  declaration section</p>
  
  <pre><code>@synthesize totalHeads = _totalHeads;
  </code></pre>
  
  <p>further down</p>
  
  <pre><code>[self setTotalHeads:[self totalHeads] + 1];
  </code></pre>
  
  <p>which replaces the old code of</p>
  
  <pre><code>_totalHeads ++;
  </code></pre>
  
  <p>Is there a more elegant way to do this?<br>
  (apologies if this is a duplicate question, I was having a hard time figuring out good search terms)</p>