1

I have an app the I update a table row through a UIActionSheet. On the sheet I present a UIPickerView. The UIPickerView works and looks great in portrait on the iphone. But when I bring it up in landscape mode, it still works, but the outline area appears black And unselected numbers are black also.

Below is a screenshot and code. Is there anything obviously wrong?

enter image description here

// create enough space for the UIPicker to show up above the selection button
NSString *title = @"\n\n\n\n\n\n\n\n\n\n\n\n";

if ((UIDeviceOrientationIsLandscape([UIDevice currentDevice].orientation)) &&
    (UI_USER_INTERFACE_IDIOM() != UIUserInterfaceIdiomPad)) {
    title = @"\n\n\n\n\n\n\n\n\n";
}


UIActionSheet *actionSheet = [[UIActionSheet alloc] initWithTitle:title delegate:self cancelButtonTitle:nil destructiveButtonTitle:nil otherButtonTitles:NSLocalizedString(@"Choose", @"Click to finilize Value - Timer"), nil];
[actionSheet showInView:viewController.view];

UIDatePicker *pickerView = [[UIDatePicker alloc] init];
[pickerView setDatePickerMode: UIDatePickerModeCountDownTimer];
if (timerInterval == 0) timerInterval = 5;
[pickerView setMinuteInterval: timerInterval];
[pickerView setCountDownDuration: [timerRec.timerDuration intValue]];

pickerView.tag = 101;

if ((UIDeviceOrientationIsLandscape([UIDevice currentDevice].orientation)) &&
    (UI_USER_INTERFACE_IDIOM() != UIUserInterfaceIdiomPad)) {
    pickerView.frame = CGRectMake(0,0, 50,50);
}

//pickerView.delegate = self;
//pickerView.dataSource = self;
//ickerView.showsSelectionIndicator = YES;

[actionSheet addSubview:pickerView];
krason
  • 45
  • 6
  • I've been debugging this some more. I have found that when the UIDatePicker is: [pickerView setDatePickerMode: UIDatePickerModeTime] everything works fine, but with [pickerView setDatePickerMode: UIDatePickerModeCountDownTimer] the problem is occurring. So this is only with countdown timer. – krason Sep 15 '12 at 00:26
  • I'm having the EXACT same problem! Did you get anywhere with this? – elsurudo Dec 18 '12 at 19:49

0 Answers0