I want to add programmatically a modal UIAlertController with a UIDatePicker in it to pick a date in iOS 7. The picker works fine but the height of the UIAlertController is not heigh enough to show the date picker. Solving this is probably very simple but I can't find the solution.
-(void) iphoneActionsheet {
self.searchActionSheet=[UIAlertController alertControllerWithTitle:@"" message:@"" preferredStyle:UIAlertControllerStyleActionSheet];
self.searchActionSheet.modalPresentationStyle = UIModalPresentationOverCurrentContext;
NSInteger iPhoneWidth = self.view.frame.size.width;
self.searchActionSheet.view.frame = CGRectMake(0, 0, iPhoneWidth, 250);
[ self.searchActionSheet.view setBounds:CGRectMake(0, 0, iPhoneWidth, 250)];
UIView *datepickerView = [UIView new];
datepickerView.frame = CGRectMake(0, 0, self.view.frame.size.width, 250);
UIDatePicker *datePicker=[UIDatePicker new];//Date picker
datePicker.frame=CGRectMake(0,0,iPhoneWidth, 200);
datePicker.datePickerMode = UIDatePickerModeTime;
[datePicker setMinuteInterval:1];
[datePicker setTag:10];
if(self.activeDate)[datePicker setDate:self.activeDate];
[datePicker addTarget:self action:@selector(datePickerResult:) forControlEvents:UIControlEventValueChanged];
[datepickerView addSubview:datePicker];
[self.searchActionSheet.view addSubview:datepickerView];
[self presentViewController:self.searchActionSheet animated:YES completion:nil];
}