I am adding a view as a subview using [self.view addSubview:myView]
. This works fine in portrait mode. However, it doesn\'t work at all in landscape. How do I add l
There are few things about Auto layouts. When ever you add layout constraints make sure it is not ambiguous. Ambiguous layout would result in undefined behaviour in your display. So good idea is to use IB which will never allow you to create a ambiguous layout, but you got to go through all the constraints to make sure they are valid.
If you want to do it programatically I would suggest you to use Visual language.
It will be helpful to go though these tips before using layout.