2012-05-25 59 views
1

使用以下代碼添加DatePicker,我可以滾動年份而不是日期或月份。有任何想法嗎?UIDatePicker不會滾動日期或月份

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); 

感謝, 裏克

回答

1

揀出器掛在視野之外,所以沒有事件傳遞給視圖...