1

使用以下代码添加 DatePicker,我可以滚动年份,但不能滚动日期或月份。有任何想法吗?

datePicker = new UIDatePicker(pickerRect);
datePicker.Mode = UIDatePickerMode.Date;
datePicker.SetDate(appDelegate.store.builderPlan.p_startDateTime, true);    
datePicker.AutoresizingMask = UIViewAutoresizing.FlexibleDimensions;
datePicker.ValueChanged += delegate(object sender, EventArgs e) {
        SetDate();
        };
this.AddSubview(datePicker);

谢谢,瑞克

4

1 回答 1

1

选择器挂在视图之外,因此没有事件传递到视图...

于 2012-05-25T18:28:53.480 回答