Forcing an iPad app to show splitView even in Portrait orientation(Like the Settings iPad app)(强制 iPad 应用程序在纵向显示 splitView(如设置 iPad 应用程序))
问题描述
我正在尝试开发一个基于 splitView 的 iPad 应用程序,它可以在每个方向上显示拆分界面.我已经尝试按照 this 教程,但它不起作用.我尝试创建一个类别来设置 _hidesMasterViewInPortrait = (hidden) ?0 : 1;
,正如上述博客中的评论之一所建议的那样,但没有任何效果.
I am trying to develop a splitView based iPad app, that displays the split interface in every orientation. I have tried subclassing the UISplitViewController class as given in this tutorial, but it doesn't work. I tried creating a category to set _hidesMasterViewInPortrait = (hidden) ? 0 : 1;
, as suggested in one of the comments in the above blog, but nothing worked.
谁能在不使用任何第三方框架或类的情况下帮助我找到解决方法?
Can anyone help me to find a way out of this, without using any third party frameworks or classes?
推荐答案
我从来没有实现强制 SPlitViewController 这样做,但由于您需要为这两个部分创建控制器,您可以重用这些控制器以显示内容的方式你想要它.
I never achieved to force the SPlitViewController to do that but since you need to create controllers for both parts, you can just reuse those controllers to display the content the way you want it.
这篇关于强制 iPad 应用程序在纵向显示 splitView(如设置 iPad 应用程序)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:强制 iPad 应用程序在纵向显示 splitView(如设置 iPad 应用程序)
基础教程推荐
- Android:对话框关闭而不调用关闭 2022-01-01
- 在 gmail 中为 ios 应用程序检索朋友的朋友 2022-01-01
- android 应用程序已发布,但在 google play 中找不到 2022-01-01
- 如何在 UIImageView 中异步加载图像? 2022-01-01
- 如何在没有IB的情况下将2个按钮添加到右侧的UINavigationbar? 2022-01-01
- 如何在 iPhone 上显示来自 API 的 HTML 文本? 2022-01-01
- 当从同一个组件调用时,两个 IBAction 触发的顺序是什么? 2022-01-01
- 如何让对象对 Cocos2D 中的触摸做出反应? 2022-01-01
- UIWebView 委托方法 shouldStartLoadWithRequest:在 WKWebView 中等效? 2022-01-01
- Kivy Buildozer 无法构建 apk,命令失败:./distribute.sh -m “kivy"d 2022-01-01