title: Removing Random Items From NSMutableArray
body: <p>I have a program where a user enter strings into an NSMutableArray (myArray) via a Text Field. This array is passed into the next view controller where there is a label (myLabel) and two buttons. Printed to the label is a random string from myArray. ButtonA displays a different random string from the array when pressed and ButtonB removes the current string that is printed to the label and then displays a random string from the array to the label. </p>
  
  <p>This is my current solution: </p>
  
  <pre><code>- (void)viewDidLoad {
  
  self.myLabel.text = [self.myArray objectAtIndex:arc4random() % [myArray count]];
  
  
  -(IBAction)ButtonA:(id)sender {
  
   self.myLabel.text = [self.myArray objectAtIndex:arc4random() % [myArray count]];
  
   }
  
  -(IBAction)ButtonB:(id)sender {
  
   NSInteger index = [myArray indexOfObject: //what goes here?];
   [self.myArray removeObjectAtIndex:index];
   self.myLabel.text = [self.myArray objectAtIndex:arc4random() % [myArray count]];
  
   }
  </code></pre>
  
  <p>Is there a way to get the index of the random string displayed and then remove it from the array? I want this to continue doing this until all items from the array have been removed. Thank you</p>