Could not instantiate class named NSLayoutConstraint solution

When running my iOS application from XCode I got the following exception:

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

This exception means that the new NSLayoutConstraint class is not supported. When creating XIBs from Xcode, the option to use this class is enabled by default. The solution is to select your XIB and uncheck the box in the Interface Builder that says “Use Autolayout”.

Share Button

Leave a Reply

Your email address will not be published.

Time limit is exhausted. Please reload the CAPTCHA.