0

I am currently using container view in my application but i am having a strange issue regarding the autoresizing of the view. Here are the snapshots of the demo application I am building.

The below image shows what I am doing for the normal view that is of normal iphone view size.

This view resizes correctly with the constraints I added.

enter image description here

Now here I am using a container view which has a size of 150*280 and have used the same constraints as above.

enter image description here

Here it shows a snapshot of portrait view with no issues in the navigator. enter image description here

But when I change the orientation it gives the following warning.

enter image description here

How do I solve this issue? Thanks

BoredToDeath
  • 431
  • 2
  • 7
  • 21

1 Answers1

0

I have noticed that sometimes the Interface Builder just doesn't refresh the elements placed via constracints correctly when changing orientation for the Viewontroller.

If you click on the yellow warning icon and select "Update frame", chances are it will display properly. On the actual device it should also display properly.

cania
  • 857
  • 10
  • 16
  • if i click update frame,the view shows up in landscape,but when i switch back to inferred mode the view has the same warning and the view doesn't show up – BoredToDeath Mar 21 '14 at 12:24
  • As I said: it will not update properly in the interface builder, unless you manually select 'update frame'. It will behave like this each time you change orientation. – cania Mar 21 '14 at 12:27
  • Do you mean that it will display correctly on the device or simulator? If i run the app on the device will it show up correctly? – BoredToDeath Mar 21 '14 at 12:36
  • Yes it (most likely) will work correctly on an actual device or the Simulator. – cania Mar 21 '14 at 12:39