Chr*_*ken 5 rendering uidatepicker xamarin.ios ipad ios
当我创建一个新的UIDatePicker,其Mode设置为CountDownTimer时,它呈现黑色背景很差.有人有任何见解吗?

Normal Picker看起来像这样:

代码:请注意,UIButton是拾取器后面的全屏按钮,用于关闭视图
intervalPicker = new UIDatePicker(new RectangleF(0, this.tvc.View.Bounds.Height - 135, this.tvc.View.Bounds.Width, 200));
intervalPicker.Mode = UIDatePickerMode.CountDownTimer;
intervalPicker.CountDownDuration = DeviceSession.CurrentBehavioralEvent.Duration*60;
intervalPicker.ValueChanged += new EventHandler(intervalPicker_EditingChanged);
UIButton b = UIButton.FromType(UIButtonType.Custom);
b.Opaque = false;
b.BackgroundColor = UIColor.Clear;
b.Frame = new RectangleF(0, 0, this.tvc.View.Bounds.Width, this.tvc.View.Bounds.Height);
b.TouchUpInside += (o, s) => {
intervalPicker.RemoveFromSuperview();
b.RemoveFromSuperview();
};
this.tvc.NavigationController.View.AddSubview(b);
this.tvc.NavigationController.View.AddSubview(intervalPicker);
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
1444 次 |
| 最近记录: |