Ipad中的splitViewController不会隐藏在肖像中 [英] splitViewController in Ipad that doesnt hide in portrait

查看:64
本文介绍了Ipad中的splitViewController不会隐藏在肖像中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想创建一个具有标签栏的应用程序。在每个TabBar中,我想使用两个视图,即左侧的表视图和另一侧的详细视图。但是TableView应该保持纵向和横向(就像在iPad中设置应用程序一样)。

I want to make an application which has Tab bar. In each TabBar I want to use Two Views that is Table View on left side and Detail View on other side. But the TableView should persist in portrait as well as landscape (same like setting app in iPad).

我看到了一些使用私有API的建议这是一个使用风险。

I have seen some recommendation of using private API that is a risk to use.

[splitViewController setHidesMasterViewInPortrait:NO];

和Matt Legend的一些教程 https://github.com/mattgemmell/MGSplitViewController
但我不需要那么多的自定义。

and some tutorial like Matt Legend's https://github.com/mattgemmell/MGSplitViewController but I don't need that much customization.

任何正确方向的提示或教程都将受到高度赞赏。

Any Hint or tutorial in right direction would be highly appreciated.

以下教程在4.2中打破: -

The below tutorial is broken in 4.2 it seems:-

http://blog.blackwhale .at / 2010/04 / your-first-ipad-split-view-application /

推荐答案

iOS 5官方支持以下内容,我相信你正在努力实现的效果:

iOS 5 officially supports the following, which I believe is the effect you are trying to achieve:

- (BOOL)splitViewController:(UISplitViewController *)svc shouldHideViewController :(UIViewController *)vc inOrientation:(UIInterfaceOrientation)orientation
{
return NO;
}

这篇关于Ipad中的splitViewController不会隐藏在肖像中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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