Khi tôi tạo UIDatePicker mới với Chế độ được đặt thành CountDownTimer, nó hiển thị kém với nền đen. Bất cứ ai có bất kỳ cái nhìn sâu sắc? IOS: UIDatePicker hiển thị kém với nền đen
Bình thường Picker trông như thế này:
Mã sản phẩm: Chú ý các UIButton là một nút toàn màn hình đằng sau hộp thoại để bỏ qua những cái nhìn
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);
bài mã bạn đang sử dụng. – WrightsCS
Tôi đã đăng mã ở trên. –