Note that there are some explanatory texts on larger screens.

plurals
  1. POWhy Is Bottom Half of Custom UIActionSheet with UIDatePicker Disabled?
    text
    copied!<p>Everything seems to be working great with my UIActionSheet that contains a UIDatePicker except that the bottom half of the DatePicker is disabled. Visually there is a shadow that makes the bottom half of the picker darker than the top half. Everything in the bottom half is disabled and I can't for the life of me figure out how to enable it. </p> <p>I also noticed in my other "normal" UIActionSheets that just contain buttons, the bottom half of the cancel buttons are disabled. </p> <p>This is the code for my custom UIActionSheet:</p> <pre><code>self.datePickerView = [[UIDatePicker alloc] init]; self.datePickerView.datePickerMode = UIDatePickerModeDate; self.actionSheet = [[UIActionSheet alloc] initWithTitle:@"Choose a Follow-up Date" delegate:self cancelButtonTitle:nil destructiveButtonTitle:nil otherButtonTitles:@"Done", nil]; [self.actionSheet showInView:self.view]; [self.actionSheet addSubview:self.datePickerView]; [self.actionSheet sendSubviewToBack:self.datePickerView]; [self.actionSheet setBounds:CGRectMake(0,0,320, 500)]; CGRect pickerRect = self.datePickerView.bounds; pickerRect.origin.y = -95; self.datePickerView.bounds = pickerRect; </code></pre> <p>I've tried several things including sendSubviewToBack, BringSubviewToFront, etc but I have not had any luck. I appreciate your help!</p> <p>Here is a screenshot. I added the red boxes for clarification. <a href="http://gorgando.com/UIActionSheet%20Problem.png" rel="nofollow noreferrer">alt text http://gorgando.com/UIActionSheet%20Problem.png</a></p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload