title: arc4random_uniform 64-bit ios
body: <p>What is the best way to use arc4random_uniform in a device independent (32-bit/64-bit) manner?  I have the following line:</p>
  
  <pre><code>UIColor *itemColor = [colors objectAtIndex: (arc4random_uniform([colors count]))];
  </code></pre>
  
  <p>On 64-bit you get a loss of precision when converting [colors count] to the argument for arc4random_uniform.  On 32-bit it is fine.  </p>
  
  <p>What I'm trying to do is to rewrite this line so it doesn't throw a warning when compiled under either 32-bit or 64-bit.  It is safe to assume [colors count] will not assume a value greater than 16.  Thanks for recommendation.</p>