title: iOS - Wierd out of bound exception
body: <p>I have a pickerView with some strings in it <code>(0,1,2,3,4,5,6,7)</code> and in the other component <code>(0,15,30,45)</code></p>
  
  <p>everything is working fine except, when i choose something from component 1, above 3. it gives me an out of bounds exception.</p>
  
  <p>in <code>viewDidLoad</code> i declare it and fill it.</p>
  
  <pre><code>hoursArray = @[@"0",@"1",@"2",@"3",@"4",@"5",@"6",@"7"];
  </code></pre>
  
  <p>i do not touch it at all, only for nslogs.
  in the pickers didSelectRow, i can <code>NSlog([hoursarray objectAtindex:7)</code> and it writes 7.</p>
  
  <p>but if i pick above 3 in the picker, it gives me:</p>
  
  <blockquote>
    <p>Terminating app due to uncaught exception 'NSRangeException', reason:
    '<em>*</em> -[__NSArrayI objectAtIndex:]: index 4 beyond bounds [0 .. 3]</p>
  </blockquote>
  
  <p>the following code is a NSLOG to print array index 4, its working.
  but in the picker index 4 is out of bounds, and it IS the same array</p>
  
  <pre><code>-(void)pickerView:(UIPickerView *)pickerView didSelectRow:(NSInteger)row inComponent:(NSInteger)component{
  
  NSLog(@"hours array index 4:%@",[hoursArray objectAtIndex:7]);
  
  
  NSString *selectedHours = @"0";
  NSString *selectedQuarters = @"0";
  
  //get picker values
  if(component==0) {
      selectedHours = [hoursArray objectAtIndex:row];
      selectedQuarters = [quarterArray objectAtIndex:row];
  }else {
      selectedHours = [hoursArray objectAtIndex:row];
      selectedQuarters = [quarterArray objectAtIndex:row];
  }
  //create formatted date
  NSDateFormatter *formatter = [[NSDateFormatter alloc]init];
  [formatter setDateFormat:@" dd/MM"];
  NSString *displayDate = [formatter stringFromDate:[datePicker date]];
  
  NSString *lblString = [[NSString alloc]initWithFormat:@"Tryk for at tilføje %@ time(r) &amp; %@ minutter til d. %@ ",selectedHours,selectedQuarters,displayDate];
  
  [btnRegistrer setTitle:lblString forState:UIControlStateNormal];
  </code></pre>
  
  <p>}</p>