“Could not instantiate class called UIStoryboardShowSegueTemplate” - how can I make Storyboard happy with iOS 7 and iOS 8?

I created a project in Xcode6 beta 6 or so (upgraded to b7 today). Using Swift, they are developed for iOS 8 SDKs, etc.

There are two view controllers in the storyboard, and between the two there is the "Show" setting (it does not start directly with the button, it is processed by a successful login)

enter image description here

All groovy. And then I tried to run the application on the iOS 7.1 simulator. He dies on the first screen with this message:

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

Well, as “Show” is displayed as “Adaptive Segue”, and the Adaptive UI is pretty much the concept of iOS 8, it makes sense that iOS 7 will have a problem with it.

Since they got to the point that they basically say “look, this is what we called Push,” I suppose I changed Segue to “Push.” Sure, it's out of date, but I'll just rip it off when iOS 8 takes over.

Also, if I use it, I get a warning

enter image description here

Well, shit, I don’t want to see any annoying warning, but I'm not sure I want to give up compatibility with iOS 7 (although this is out of the question). And this is not in the code, so I cannot suppress the warning (or I do not know how to do this).

How can I make a Storyboard Segue happy as in iOS 7 and 8 in Xcode 6?

+6
source share
2 answers

You can still use the new Segue type (for example, Show) for iOS 7. Make sure in the Storyboard interface builder document, install “Builds for” on iOS 7, not iOS8. (Sorry, screenshot prepared, but I don’t have enough reputation to post it)

Inside File Inspector select the lowest: enter image description here

+20
source

How do I get the same problem with my project too. I allow this by double-checking all the segues defined in the application. Make sure all segues will have some kind of action, like push / pop / modal.

If not, then this controller will fail. Please check the snapshot snapshot that you find in your storyboard.

your storyboard image will look like the first image.

enter image description here

Selected selection is selected.

enter image description here

+1
source

Source: https://habr.com/ru/post/974719/


All Articles