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 应用程序)


基础教程推荐
- 如何使用 YouTube API V3? 2022-01-01
- 在 iOS 上默认是 char 签名还是 unsigned? 2022-01-01
- Android文本颜色不会改变颜色 2022-01-01
- 使用 Ryzen 处理器同时运行 WSL2 和 Android Studio 2022-01-01
- Android ViewPager:在 ViewPager 中更新屏幕外但缓存的片段 2022-01-01
- :hover 状态不会在 iOS 上结束 2022-01-01
- LocationClient 与 LocationManager 2022-01-01
- “让"到底是怎么回事?关键字在 Swift 中的作用? 2022-01-01
- 固定小数的Android Money Input 2022-01-01
- 如何使 UINavigationBar 背景透明? 2022-01-01