title: Correct use casting float to int for percentage?
body: <p>I'm using this code to attempt to convert a float to an int, then use it for UILabel text:</p>
  
  <pre><code>[progLabel setText:[NSString stringWithFormat:@"Deck Progress %i%%",progBar.progress*100]];
  </code></pre>
  
  <p>and I've tried this:</p>
  
  <pre><code>[progLabel setText:[NSString stringWithFormat:@"Deck Progress %i%%",(int)progBar.progress*100]];
  </code></pre>
  
  <p>The displayed text is always "0%".</p>
  
  <p>I also tried this which works:</p>
  
  <pre><code>int pval=progBar.progress*100;
  [progLabel setText:[NSString stringWithFormat:@"Deck Progress %i%%",pval]];
  </code></pre>
  
  <p>I've tried  %f%%  but that gives me too many digits - I'm trying to get only 0-100, no decimal places.</p>
  
  <p>What am I doing wrong?</p>