title: Pick random element of NSArray in Objective-C
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/3318902/picking-a-random-object-in-an-nsarray">Picking a Random Object in an NSArray</a>  </p>
  </blockquote>
  
  
  
  <p>I have have an array in Objective-C with strings:</p>
  
  <pre><code>NSArray *tips;
  tips = [NSArray arrayWithObjects:
         @"Foo",
         @"Bar",
         @"Baz",
         nil];
  </code></pre>
  
  <p>I want a method that takes a random item from the array, and returns it. Is there a method, or how can I write one myself? Thanks.</p>