title: UIDatePickerView issue since update to ios 8
body: <p>Ive just updated to iOS 8 and I have a problem with my application, everything but the date pickers on the action sheet work. When the action is selected for the action sheet to display along with the date picker added as a subview, the app crashes. I found the problem code which is :</p>
  
  <pre><code>-(void)willPresentActionSheet:(UIActionSheet*)actionSheet{
  
  theDatePicker = [[UIDatePicker alloc]initWithFrame:CGRectMake(0, 40, 320, 216)];
  [actionSheet addSubview:theDatePicker];
  
  
  NSArray *subviews = [actionSheet subviews];
  [[subviews objectAtIndex:0]setFrame:CGRectMake(20, 266, 280, 46)]; //this line
  [[subviews objectAtIndex:1]setFrame:CGRectMake(20, 317, 280, 46)]; //also this one
  
  }
  </code></pre>
  
  <p>The console log produces this :</p>
  
  <pre><code>-[__NSArrayM objectAtIndex:]: index 1 beyond bounds [0 .. 0]' 
  </code></pre>
  
  <p>Previously I solved it (badly) by changing each index to 2 &amp; 3 which worked but was a messy implementation.</p>
  
  <p>This is the actual implementation:</p>
  
  <pre><code>-(void)willPresentActionSheet:(UIActionSheet*)actionSheet{
  
   theDatePicker = [[UIDatePicker alloc]initWithFrame:CGRectMake(0, 40, 320, 216)];
   [actionSheet addSubview:theDatePicker];
  
  
   NSArray *subviews = [actionSheet subviews];
   [[subviews objectAtIndex:0]setFrame:CGRectMake(20, 266, 280, 46)];
   [[subviews objectAtIndex:1]setFrame:CGRectMake(20, 317, 280, 46)];
  
  }
  
  -(void)datePickerViewFromInput:(NSString*)title{
      SheetPicker=[[UIActionSheet alloc]initWithTitle: title delegate:self cancelButtonTitle:@"Cancel"        destructiveButtonTitle:nil otherButtonTitles:@"Set", nil];
  [SheetPicker showInView:self.view ];
  [SheetPicker setFrame:CGRectMake(0,117, 325, 383)];
  theDatePicker.datePickerMode = UIDatePickerModeDate;
  NSDateFormatter *Formatter = [[NSDateFormatter alloc]init];
  [Formatter setDateFormat:@"MM/dd/yyyy"];
  
  }
  </code></pre>
  
  <p>If i remove the problem code, the action sheet will show, but there is no longer a date picker. (I have no idea why)</p>
  
  <p>Any ideas on how to fix this?</p>
  
  <p>Thanks in advance</p>