最佳答案
默认情况下,Xcode 6 Interface Builder 有一个新的复选框“ use size class”,它使视图具有自适应性。
当我试图在故事板中的两个视图之间切换时,我有了新的选择:
而是老了:
现在我们有了“ show”和“ current modally”,而不是“ push”和“ mode”。旧选项被标记为已弃用。我选择了“ show”选项,因为在接下来的设置中它被称为“ show (例如 push)”
但是它不会推动。继续动画看起来像从底部的幻灯片(模态)和导航栏消失。
问题是: 我怎样才能使“显示”像推动一样工作?是否有可能或者我应该使用“推(弃用)”代替?我在哪里可以找到任何关于新类型的接续的信息?我在 iOS8开发者库中找到的唯一一样东西是 情节串连板帮助你设计你的用户界面,但是没有关于“ show”segue 的信息。
我尝试创建新的项目和“显示”是真正的工作喜欢“推”。 我认为我的项目中的问题可能是因为我使用这样的代码重用导航控制器,但我不知道如何修复它。
if ( [segue isKindOfClass: [SWRevealViewControllerSegue class]] ) {
SWRevealViewControllerSegue *swSegue = (SWRevealViewControllerSegue*) segue;
swSegue.performBlock = ^(SWRevealViewControllerSegue* rvc_segue, UIViewController* svc, UIViewController* dvc) {
UINavigationController* navController = (UINavigationController*)self.revealViewController.frontViewController;
[navController setViewControllers: @[dvc] animated: NO ];
[self.revealViewController setFrontViewPosition: FrontViewPositionLeft animated: YES];
};
}
在那之后,我尝试将 NewViewController 推到 MainViewController 之后
我似乎只有 iOS7,iOS7.1的问题。