UIView 方向以编程方式更改
我有 uiview,其中添加了 uiviewtablecontroller 作为子视图,我的设备以横向模式启动,但 tableviewcontroller 始终处于纵向模式
i have uiview with a uiviewtablecontroller added as subview, my device starts in landscape mode but tableviewcontroller is always in the portrait mode
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
下面的方法“return yes”将会改变方向,如果是“return NO”则方向不会改变。在您的视图中使用此方法。
一切顺利。
The below method "return yes" will make orientation change if it is "return NO" the orientation will not change.Use this method in your view.
All the best.
我的沙箱应用程序:
接口(h 文件)中的https://github.com/comonitos/programatical_device_orientation
:
实现中(m 文件 ) ):
My sandbox app:
https://github.com/comonitos/programatical_device_orientation
in interface (h file) :
in implementation (m file):