本文介绍了iPad风景单导航栏的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的应用程序在iPad模式和横向调用单个导航栏时证明很麻烦。

My app in iPad mode and landscape calls for a single navigation bar its proving troublesome.

想法是在景观中不会有两个独立的导航栏用于Master和细节:见下图(图片来自谷歌图片和修改,而不是我的项目)

The idea is that in landscape there wouldnt be 2 separate nav bars for Master and Detail : see below (Images taken from Google Images and modified, not my project)

但是会有一个导航栏,如下所示:

but instead there would be a single nav bar, like so:

我试图避免使用非常破解的方法,因为我的导航使用了很多自定义样式,但我现在想到的唯一方法是调整SplitView超类中的视图并覆盖导航栏,但是想看看是否有人否则在
之前有任何成功吗?

I'm trying to avoid very hackish methods because my navs use a lot of custom stylings but the only way I can think at the moment is to resize the view in the SplitView superclass and override the nav bar, but wanted to see if anyone else had any success beforeAny ideas?

推荐答案

分割视图控制器的工作方式,它显示两个独立的查看控制器。如果要使用统一导航栏,请不要使用拆分视图控制器,只需使用常规视图控制器,并将表视图嵌入到普通视图中,并实施适当的协议来控制表

The way that the split view controller works, it displays two separate view controllers. If you want to have the unified navigation bar, don't use a split view controller, just use a regular view controller, and embed the table view in your normal view, and implement the appropriate protocols to control the table

这篇关于iPad风景单导航栏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-14 13:24