iPad 中 PopoverView 中的 UIDatePicker
我有一个运行 iOS 3.2.2 的 iPad 特定应用程序,它在 ui 弹出窗口中显示设置视图。这一切都渲染得很好,但现在我试图让一个日期选择器在视图内渲染,但不确定显示它的最佳方法是什么。
现在它有一个按钮可以切换模式中日期选择器的可见性,但与操作表的正常方法相比,这对于管理解雇来说似乎非常笨拙。
我无法找到针对这种情况的“最佳实践”,并且想知道是否有人以前遇到过这种情况并可以提供一些建议或指导。
谢谢!
I have an iPad specific application running iOS 3.2.2 which displays a settings view in a 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!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
请检查链接中提供的解决方案..可能会对您有所帮助。
1. 以编程方式创建 UIDatePicker(不使用 IB)
2. 在显示弹出窗口后将其添加到视图
http://omegadelta.net/2010/06/04/ipad-simulator-crashes-if-a-uidatepicker-is-in-a-uipopovercontroller/
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
http://omegadelta.net/2010/06/04/ipad-simulator-crashes-if-a-uidatepicker-is-in-a-uipopovercontroller/
请注意此处的答案,表明 UIPickerView 在弹出窗口中呈现时必须是控制器的根视图。听起来您可能正在尝试将日期选择器放置为弹出窗口内的多个视图之一。如果是这样,您将遇到此处描述的问题。
尝试解决此问题错误:找不到映射图像 UIPickerViewFrameLeft-162-Popover.png
Note the answer here indicating that the UIPickerView must be the root view of your controller when presented in a popover. 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