- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在使用 IIViewDeckController
,我希望始终打开左侧 Controller 并调整中心 View 的大小,以便布局看起来类似于 UISplitViewController
。
根据文档:
It is possible to have the viewController always show a side controller. You do this by setting the maxSize value to any (positive) nonzero value. This will force the centerview to be always opened, exposing a side controller permanently. This only works when you have ONE sidecontroller specified (this means either a left side controller or a right side controller), because this scenario does not make sense if you would be able to slide the center view in both directions. When you have 2 side controllers, this property is ignored.
我完全按照它说的做了,但它不会总是显示侧 Controller :
PUCNews *news = [[PUCNews alloc] init];
UINavigationController *newsNav = [[UINavigationController alloc] initWithRootViewController:news];
[puc.cachedViewControllers setObject:newsNav forKey:@"news"];
PUCLeftNavigationViewController *leftNav = [[PUCLeftNavigationViewController alloc] init];
IIViewDeckController *deckController = [[IIViewDeckController alloc] initWithCenterViewController:newsNav leftViewController:leftNav];
deckController.openSlideAnimationDuration = 0.20f;
deckController.closeSlideAnimationDuration = 0.20;
deckController.centerhiddenInteractivity = IIViewDeckCenterHiddenNotUserInteractiveWithTapToClose;
deckController.elastic = NO;
if ([Utility isIpad]) {
//deckController.leftSize = 200;
deckController.maxSize = 500;
//deckController.sizeMode = IIViewDeckLedgeSizeMode;
[deckController toggleLeftViewAnimated:NO];
deckController.centerhiddenInteractivity = IIViewDeckCenterHiddenUserInteractive;
deckController.resizesCenterView = YES;
deckController.panningMode = IIViewDeckNoPanning;
}
这也导致了一些非常奇怪的旋转问题。
如何始终打开左侧 Controller 并调整中心 View 的大小,使其适合屏幕的其余部分?
最佳答案
我用过,
self.leftController = leftController;
self.leftSize = 700;
[self openLeftViewAnimated:NO];
这对我有用,因为我想要左侧尺寸的小空间。之后您可能需要调整大小,但这有效!
希望对你有帮助。
干杯
关于ios - IIViewDeckController 左侧始终显示在 iPad 上,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16950719/
我有 iOS 应用程序,我在其中使用 IIViewDeckController 作为侧 Controller 。 但是当我尝试使用 presentViewController 时,它会导致一些奇怪的效
我正在使用 IIViewDeckController,我希望始终打开左侧 Controller 并调整中心 View 的大小,以便布局看起来类似于 UISplitViewController。 根据文
在我的带有 xCode 5 和 iOs 7 的应用程序中一切正常,但昨天我安装了 xCode 6 并滑动到我的应用程序的左侧 View ,在左上角显示了一个大约 150 像素高度和 200 像素高度的
IIViewDeckController 2.2.11 如何去掉centerViewController 的阴影?我知道我必须使用实现 viewDeckController:applyShadow:w
如果我将 View 平台 Controller 设置为 AppDelegate 窗口的根 Controller ,则当应用程序在 iPad 上以横向启动时,中心 View 将以其纵向大小显示,而不是调
如果您在理解标题时遇到问题,那么问题就来了。我正在使用 this库在这里,它由 IIViewDeckController 表示。 我用简单的左和中 UIViewControllers 初始化它: FT
我是一名优秀的程序员,十分优秀!