横向操作表中的 UIPickerView
我在 iPhone 应用程序的操作表中显示选择器视图;也就是说,我在视图中有一个按钮,它会触发一个包含选择器视图的操作表。它工作得很好,除非用户旋转设备。当用户以横向模式显示视图,然后触摸操作表的按钮时,选择器视图确实会出现,但它看起来是被抬起的。另一方面,当用户以纵向模式加载视图,然后触摸提示操作表的按钮时,看起来不错。对于这里可能发生的事情有什么想法吗?
I display a picker view in an actionsheet in my iPhone app; that is, I have a button in a view which triggers an actionsheet that holds a picker view. It works great, except when the user rotates the device. When the user displays the view in landscape mode and then touches the button for the actionsheet, the pickerview does appear, but it looks jacked up. On the other hand, when the user loads the view in portrait mode and then touches the button which prompts the actionsheet, it looks ok. Any thoughts as to what might be going on here?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
确保配置操作表的边界和选取器视图的框架以适合您使用的方向。
我对风景使用以下设置:
对肖像使用以下设置:
祝你好运!
//濑户
Make sure you configure the bounds of the action sheet and the frame of the pickerview to suit the orientation you're using.
I'm using the following settings for landscape:
And the following for portrait:
Good luck!
//Seto