title: Why is percentage UILabel showing 'nan%'
body: <p>At the moment, the app itself records cues in a certain sports match. It captures the information by updating through the <code>UIStepper</code> which will update the <code>UILabel</code>'s to 1, 2, 3... etc. </p>
  
  <p>However, when I press 'minus' on the <code>UIStepper</code> to change the <code>UILabel</code> back to zero, the <code>UILabel</code> on the right side of the <code>UIStepper</code> that shows the percentages of the cues displays 'nan%' Please see the attached picture.</p>
  
  <p><img src="https://i.stack.imgur.com/mfSKQ.png" alt="enter image description here"></p>
  
  <p>Why does it do this?</p>
  
  <p><strong>Code for the percentage labels</strong></p>
  
  <pre><code>self.smashPercentageLabel.text = [NSString stringWithFormat:@"%.2f%%",([self.smashLabel.text floatValue]/self.rallies)*100];
  </code></pre>
  
  <p>Thanks.</p>