
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,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);解决方法 当您将帧高度设置为小于216时,CountDownTimer模式下的UIDatePicker以这种方式显示.其他模式没有此问题. 您的示例是将高度设置为200.
将高度更改为216.
总结以上是内存溢出为你收集整理的ipad – IOS:UIDatePicker渲染效果不佳,背景为黑色全部内容,希望文章能够帮你解决ipad – IOS:UIDatePicker渲染效果不佳,背景为黑色所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)