“无法实例化名为UIStoryboardShowSegueTemplate的类” - 如何让故事板对iOS 7和iOS 8感到满意? [英] "Could not instantiate class named UIStoryboardShowSegueTemplate" - how can I make a Storyboard happy with iOS 7 and iOS 8?

查看:200
本文介绍了“无法实例化名为UIStoryboardShowSegueTemplate的类” - 如何让故事板对iOS 7和iOS 8感到满意?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Xcode6中创建了一个项目,测试版6左右(今天升级到b7)。使用Swift,一直在开发iOS 8 SDK等。

I created a project in Xcode6, beta 6 or so (upgraded to b7 today). Using Swift, been developing for the iOS 8 SDK, etc.

到目前为止,Storyboard有两个视图控制器,两者之间有一个segue设置为显示(它不是由按钮直接触发,而是由成功登录处理)

The Storyboard, so far, has two View Controllers, and a segue between the two set up as "Show" (it's not triggered by a button directly, it's handled by a successful login)

一切都很时髦。然后我尝试在iOS 7.1模拟器上运行该应用程序。它会在第一个屏幕上显示以下消息:

Everything is groovy. And then I tried running the app on the iOS 7.1 simulator. It dies on the first screen with this message:

*** Terminating app due to uncaught exception 
'NSInvalidUnarchiveOperationException', 
reason: 'Could not instantiate class named 
UIStoryboardShowSegueTemplate'

嗯,看看Show如何被列为自适应Segue,而自适应UI几乎是iOS 8的概念,因此iOS 7会有问题。

Well, seeing as how "Show" is listed as an "Adaptive Segue", and Adaptive UI is pretty much an iOS 8 concept, it makes sense that iOS 7 would have an issue with it.

因为他们已经基本上说看,这就是我们以前称之为Push,我想我会把Segue改为推 。当然,它已经被弃用了,但是当iOS 8接管时我会抛弃它。

Since they've gone so far as to basically say "look, this is what we used to call Push", I figure I'll change the Segue to "Push". Sure, it's deprecated, but I'll just ditch it when iOS 8 takes over.

除非我使用它,否则会收到警告

Except that if I use it I get a warning

好的废话,我不想看到一些恼人的警告,但是我不确定我是否想放弃iOS 7的兼容性(虽然这不是不可能的)。这不是代码,所以我无法抑制警告(或者我不知道如何)。

Well crap, I don't want to see some annoying warning, but I'm not sure I want to give up iOS 7 compatibility yet (though it's not out of the question). And this isn't in code so I can't suppress the warning (or I don't know how).

我怎样才能制作一个快乐的故事板Segue Xcode 6中的iOS 7和8?

How can I make a Storyboard Segue that's happy in both iOS 7 and 8 in Xcode 6?

推荐答案

你仍然可以使用适用于iOS 7的新Segue类型(如Show)确保在Storyboard界面构建器文档中,将Builds for设置为iOS 7而不是iOS8。 (抱歉屏幕截图已准备好,但我没有足够的信誉发布)

You can still use the new Segue type (such as Show) for iOS 7. Make sure in your Storyboard interface builder document, set the "Builds for" to iOS 7 rather than iOS8. (Sorry the screenshot is prepared but I have no enough reputation to post it)

文件检查器内选择最低价:

Inside the File Inspector select the lowest:

这篇关于“无法实例化名为UIStoryboardShowSegueTemplate的类” - 如何让故事板对iOS 7和iOS 8感到满意?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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