2
votes

I am getting an error

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

when I am trying to run my application in iPhone 5.1 simulator. Iam setting the NSLayoutConstraint for running the project in both 3.5 inch and 4 inch display. If the NSLayoutConstraint is not supporting for iPhone 5.1 simulator, how can I adjust the frames in 3.5 inch and 4 inch display ?

2
I guess the autoresizing height mask is the best choice. - borrrden

2 Answers

6
votes

if you have checked autoLayout feature in xcode4.5 while designing your xibs files then you will not able to support iOS 5, what you have you have to do is uncheck autolayout from each and every xib file and use autoresize feature for supporting the 4.0inch screen.
You can also try this tutorial http://www.raywenderlich.com/20881/beginning-auto-layout-part-1-of-2

3
votes

You can't use AutoLayout (i.e. NSLayoutConstraint) in iOS 5.1 because it is new to iOS 6. For all your IB files, make sure that "Use Autolayout" is not checked.