Iphone sdk自定义uiview方向问题
我正在使用基于自定义的 uiview 控制器,其中 uitabbar 包含 uitableview。我正在使用图像作为单元格背景。我想做从纵向到横向的方向,但问题是方向没有改变。我只是想知道自定义 uiviewcontroller 的方向有什么特殊的东西吗?
预先感谢
问候, 萨蒂什
I am using custom based uiview controller with uitabbar contains uitableview. I am using image for cell background. I want to do orientation from portrait to landscape but the issue is it is not changing on orientation. I just want to know is there are any special thing for custom uiviewcontroller for orientation?
Thanks in advance
Regards,
sathish
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果旋转设备时没有任何反应,则说明您启用了系统范围的旋转锁定(您检查过这一点,对吧?),或者您的视图控制器未将
YES
返回到其备用方向。shouldAutorotateToInterfaceOrientation:
,或者您对视图做了一些奇怪的事情,这意味着您的视图控制器没有被设置为“最前面”的控制器,因此不会被询问方向更改。如果您发布用于设置控制器及其视图的代码,那么缩小范围会更容易。If nothing happens when you rotate the device, you either have the system-wide rotation lock enabled (you checked that, right?), or your view controller isn't returning
YES
to the alternate orientation in itsshouldAutorotateToInterfaceOrientation:
, or you're doing something odd with your views that means your view controller isn't getting set as the “frontmost” one and thus isn't getting asked about orientation changes. It'll be easier to narrow that down if you post the code you're using to set up the controller and its view.