Я хочу добавить UIDatePicker в UIActionSheet, код приведен ниже:
UIActionSheet* actionSheet = [[UIActionSheet alloc] initWithTitle:@"DEMO" delegate:self cancelButtonTitle:@"Cancle" destructiveButtonTitle:nil otherButtonTitles:nil];
actionSheet = [[UIActionSheet alloc] initWithTitle:@"Ratings"
delegate:self
cancelButtonTitle:@"Cancel"
destructiveButtonTitle:nil
otherButtonTitles:nil];
UIDatePicker *pickerView = [[UIDatePicker alloc] init];
pickerView.datePickerMode = UIDatePickerModeDate;
[actionSheet addSubview:pickerView];
[actionSheet showInView:self.view];
[actionSheet sendSubviewToBack:pickerView];
[actionSheet showInView:self.view];
[actionSheet setBounds:CGRectMake(0,0,320, 500)];
CGRect pickerRect = pickerView.bounds;
pickerRect.origin.y = -100;
pickerView.bounds = pickerRect;
[pickerView release];
[actionSheet release];
Вопрос в том, почему этот код не может работать в режиме iPad, когда он работает в режиме iphone