1

There seems to be an auto layout setting in Xcode 5, though I cannot find it.

Same source code used in a project created in Xcode 4.6 behave improperly when using it directly in Xcode 5, in particular, a web view's height cannot be changed.

However if I create a empty project in Xcode 5 and code from ground up with the same source code, the positioning of web view works as expected again.

Is it possible to solve the problem by just doing some setting when we open the old Xcode 4.6 project in Xcode 5, instead of build up the project from source code in an empty Xcode 5 project from scratch?

Update - How my problem was solved

My problem was solved, but the reason is in fact not the auto layout, but my own code modifies the frame of the web view somewhere I forgot to check.

Still not sure about the if the auto layout is turned on or off when I programmatically create views instead of using interface builder/nib. When using IB or nib, we can easily turn off the auto layout feature by unchecking the Use Autolayout:

enter image description here

(Source of the image above: @Ganapathy's answer in Status bar and navigation bar issue in IOS7)

Community
  • 1
  • 1
George
  • 3,384
  • 5
  • 40
  • 64

0 Answers0