将Splitview作为IPad应用的子视图实现的官方替代方案? [英] official alternative to implement Splitview as a subview for an IPad App?

查看:67
本文介绍了将Splitview作为IPad应用的子视图实现的官方替代方案?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Ipad的 Storyboard 在IOS中开发应用程序.我想添加 UISplitViewController 作为我的应用程序的子视图.我想生成这种输出(请参见下图).当用户单击FirstView的下一步"按钮时,将出现另一个view-splitview.

I'm developing an app in IOS using Storyboard for the Ipad. I want to add UISplitViewController as a subview of my app. I want to generate this kind of output (see below image). when user click on FirstView's 'Next' button, a second view-splitview should appear.

输出:

但是 Apple的指南说,我们不能将UISplitViewController推送为模块的子视图.如果我们使用UISplitViewController,则它必须始终在我们的应用程序中可见.

But Apple's guidelines says that we can't push UISplitViewController as a subview of module. if we use a UISplitViewController, it has to be visible at all the times in our app. so

当我尝试将任何splitviewcontroller直接添加到情节提要中时,它会产生错误.

when i tried to add any splitviewcontroller directly into the storyboard, it generated the error .

拆分视图控制器无法推送到导航控制器

我四处搜寻,但不幸的是找不到适当的帮助.

I dig around the net but unfortunately couldn't find any proper help.

Apple本身是否有官方替代方式使用这种功能?

或指向工作代码或示例的任何链接以实现这种功能.如果我使用的是第三方解决方案,我的应用程序是否会因为不允许的原因而被Apple App Store禁止?

or any link to the working code or samples to implement such a kind of functionality. If i'm using third party solution, will my app get banned by Apple App store as they don't allow to do so?

我认为这是一种非常基本的功能,许多人需要在其应用程序中将其作为子模块实现.因此,必须有一个苹果内置的设施.也许我不知道.任何帮助将不胜感激.

I think this is a very basic kind of functionality which many people needs to implement in their app as a submodule. So there must be a inbuilt facility by apple. may b i don't know about it. any help would be greatly appreciated.

推荐答案

这不是您确切问题的答案,但可能会有所帮助.

This isn't an answer to your exact question, but may help in part.

我有一个使用UISplitViewController的应用程序,该UISplitViewController是UITabBarController的子视图.

I have an app that uses a UISplitViewController that is a subview of a UITabBarController.

这违反了Apple的准则,但是对于我最初是从iPhone应用程序开始设计并且想要转换为Universal应用程序的设计而言,这是理想的选择.我还想保持iPhone用户熟悉的我的应用程序的UI约定.

This goes against Apple guidelines, but was desirable for my design that started originally as an iPhone app, and that I wanted to convert to a Universal app. I also wanted to maintain the UI convention of my app that the iPhone users were familiar with.

不足为奇的是,向各种不可见的UISplitViewControllers的方向通知存在一些问题(尽管如果他们选择的话,苹果似乎可以支持它).

Unsurprisingly, there were problems with the notification of the orientation to the various UISplitViewControllers that weren't visible (though it would seem that Apple could support this if they chose to).

解决方法是使用iOS 5.0中添加的新API,

The workaround was to use the new API added in iOS 5.0,

splitViewController:shouldHideViewController:inOrientation:

...并且始终返回NO.不是理想的UI安排,但它可以工作,并且被Apple接受为应用程序更新.

...and always return NO. Not the ideal UI arrangement, but it works, and was accepted by Apple as an app update.

因此,(显然)您需要以编程方式进行此操作,而不是使用Storyboards,但我认为,如果您能够使其正常运行,Apple可能会批准.但是,如果可以避免的话,我不建议您冒险.

So, (clearly) you'll need to do this programmatically, rather than use Storyboards, but I think if you can get it working, Apple may approve. I wouldn't recommend you risk this if you can avoid it, however.

这篇关于将Splitview作为IPad应用的子视图实现的官方替代方案?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆