简体   繁体   中英

Class Unavailable. Unwind segues are not available on iOS versions prior to 6.0

I'm trying to use unwind segues in an existing iOS project, and ran into this error - "Class Unavailable. Unwind segues are not available on iOS versions prior to 6.0.". I've set my deployment target to "7.1" and build SDK to "Latest iOS (iOS 7.1)".

What am I missing? Why does xcode think I'm trying to build for < 6.0?

Even though IB is now integrated into Xcode, it was originally its own program and it is still its own compile step. Because of that, you can target individual storyboards and nibs with specific file formats (what version of Xcode can open these) and specific deployment targets (what version of iOS or OS X will run these).

It's always important to make sure that your storyboard or xib file is targeted to the same release as your app, unless you're dynamically loading them. In which case you may have a storyboard that gets loaded on iOS 7 and a different storyboard that gets loaded—perhaps with less features—on iOS 6 or before. Then these storyboards could be targeted to those deployment targets individually, and will warn or cause errors when certain, unavailable features are used.

I don't know for sure, but I think there are sometimes some older templates that target certain xib or storyboard files to something like iOS 6, so always check for that!

To check, select the IB document you're interested in, open the inspector window and select the file inspector (CMD+ALT+2), and check the Interface Builder Document section.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM