Could not instantiate class named IBNSLayoutConstraint
You're getting this error because you've set a constraint to an IBOutlet that is removed at runtime. This happens when you set the constraint to be a placeholder in Interface Builder. Since the constraint is removed, when it goes to unarchive it, it throws an error saying it can't do so.
There are two ways to correct this.
Method 1
- Right-click on your Storyboard > Open As > Source Code
- In the opened storyboard xml, search for
placeholder="YES"
. - You'll find constraints that are set to be removed at runtime. Remove the placeholder attribute from the constraint, save and close.
- Run the app and your problem should be fixed.
Method 2
- Find the constraint that's causing your problems in Interface Builder. Uncheck the Placeholder option in the GUI. This should be one of the constraints that's set to an IBOutlet in the ViewController that's causing your crash.
This is what it should look like:
Alternative
Assuming you actually want the constraint to be a placeholder, then you'll need to remove any referencing outlets. To do this, select the constraint that you wish to be a placeholder. Then open the connections inspector (the button furthest to the right that looks like this: (->) ) and then remove any referencing outlets that may exist on that constraint.
why Xcode 7.2 crash 'Could not instantiate class named IBNSLayoutConstraint'?
You probably using InterfaceBuilder Storyboard for localization. You should also consider them and remove inactive constraits inside them or use Localizable Strings for localization.
You can also check this answer.
Could not instantiate class named NSLayoutConstraint' while auto layout is disabled
I guess you would have solved the problem by now.
But for others who would stumble into this post, please check this post: https://stackoverflow.com/a/13201690/942966
App crashes with Could not instantiate class named _UIScrollViewLayoutGuide on iOS 10 and older
I had the same issue (using Xcode11 and running iOS 10.3.1).
Unchecking Content Layout Guides from the Scroll View worked for me.
image
Xcode Error: Could not instantiate class named _UIScrollViewLayoutGuide
It seems that I have found an answer! I am unsure why Xcode did not flag the error in the first place. With the new Xcode support for iOS 13, ScrollView Content Layout Guides are automatically enabled. In iOS versions below iOS 11, there is no Content Layout Guide attribute.
I disabled the Content Layout Guides by selecting the Scroll View, going to the Size Inspector and deselecting 'Content Layout Guides' at the bottom of the first section.
This fixed my issue!
NSInvalidUnarchiveOperationException: 'Could not instantiate class named _UITableViewCellSeparatorView'
I was getting the same error after updating to Xcode 5.1.
I was able to get rid of the error by editing the xib for my custom cell.
Under Interface Builder Document in the file inspector, I switched "View as" to "iOS 6.1 and Earlier". I also have "Builds for" set to "iOS 6.0 and Later".
why Xcode 7.2 crash 'Could not instantiate class named IBNSLayoutConstraint'?
You probably using InterfaceBuilder Storyboard for localization. You should also consider them and remove inactive constraits inside them or use Localizable Strings for localization.
You can also check this answer.
Could not instantiate class named UIRefreshControl Xcode
UIRefreshControl
only exists on iOS 6. So if your iPad is running 5.1.1, you won't be able to use UIRefreshControl
, because UIRefreshControl
did not exist in iOS 5.1.1. So when the nib decoding happens, the decoder finds "UIRefreshControl"
, it doesn't know what to do with it, and it crashes.
Related Topics
Invalid Signature - Code Object Is Not Signed at All
Randomly Choosing an Item from a Swift Array Without Repeating
MySQL and Swift - Upload Image and File || Would It Be Better to Use Alamofire
How to Count Rows in a Parse Class Programmatically in an iOS App Using Swift
How to Make a Call Which Begin with * in Iphone
Cast Value of Type 'Uitableviewcell' to Custom Cell
Repeat Interval for Unnotification
What Privacy-Violating or Device-Changing Things How to Do on an Iphone
Sending Data from One Viewcontroller to Another
How to Make a Swiftui Gesture That Keeps Running Code While the View Is Pressed
How to Force My Keyboard to Be Up on My Program's Start in Swift
How to Scroll to the Exact End of the Uitableview
Icon Already Includes Gloss Effects
How to Load Custom Cell ( Xib) in Uicollectionview Cell Using Swift
Xcode Won't Let to Build for Device After Denying Codesign to Access Keychain
How to Convert Including Timezone Date in Swift
Why Tesseract Ocr Library (Ios) Cannot Recognize Text at All