简体   繁体   English

iPad中的PopoverView中的UIDatePicker

[英]UIDatePicker in PopoverView in iPad

I have an iPad specific application running iOS 3.2.2 which displays a settings view in a ui popover. 我有一个运行iOS 3.2.2的iPad特定应用程序,它在ui popover中显示设置视图。 This all renders great, but now I'm trying to get a date picker to render inside the view and not sure what the best approach is for displaying it. 这一切都很好,但现在我正在尝试在视图内部渲染日期选择器,并且不确定显示它的最佳方法是什么。

Right now it has a button which toggles visibility of the date picker within the modal, but that seems very clumsy for managing dismissal compared to the normal approach of an action sheet. 现在它有一个按钮,可以切换模态中日期选择器的可见性,但与操作表的正常方法相比,这对于管理解雇来说似乎非常笨拙。

I haven't been able to find a 'best practice' for this situation and was wondering if anyone's run into this before and could offer some suggestions or guidance. 我无法找到针对这种情况的“最佳实践”,并且想知道是否有人之前遇到这种情况并且可以提供一些建议或指导。

Thanks! 谢谢!

pls check the solution provided in the link .. might help you . 请检查链接中提供的解决方案..可能对您有所帮助。 1. Create the UIDatePicker programmatically (don't use the IB) 2. add it to the view after the popup is shown 1.以编程方式创建UIDatePicker(不要使用IB)2。在显示弹出窗口后将其添加到视图中

http://omegadelta.net/2010/06/04/ipad-simulator-crashes-if-a-uidatepicker-is-in-a-uipopovercontroller/ http://omegadelta.net/2010/06/04/ipad-simulator-crashes-if-a-uidatepicker-is-in-a-uipopovercontroller/

Note the answer here indicating that the UIPickerView must be the root view of your controller when presented in a popover. 请注意这里的答案,表明UIPickerView在弹出框中显示时必须是控制器的根视图。 It sounds like you may be attempting to place the date picker as one of several views inside the popover. 听起来您可能正试图将日期选择器作为弹出窗口内的多个视图之一。 If so, you'll encounter the problem described here. 如果是这样,您将遇到此处描述的问题。

trying to fix this error: Could not find mapped image UIPickerViewFrameLeft-162-Popover.png 试图修复此错误:无法找到映射图像UIPickerViewFrameLeft-162-Popover.png

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM