Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ios 6 : NSLayoutConstraint issue in iphone 5.1 simulator

Tags:

ios

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 ?

like image 501
Dev Avatar asked Nov 19 '25 06:11

Dev


2 Answers

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

like image 113
Manish Agrawal Avatar answered Nov 20 '25 21:11

Manish Agrawal


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.

like image 34
John Estropia Avatar answered Nov 20 '25 20:11

John Estropia



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!