Reputation: 3103
I'm using a storyboard with some ViewControllers that have elements positioned with autolayout. Every time i open the storyboard, i get misplaced views even after i fix all of them. I have to update the frames time and time again. Is there any way to fix this? I'm using xcode 6.
Upvotes: 6
Views: 682
Reputation: 1
I got the same issue, and I also did not know how to fix it completely, but I found this way to make it show what I want.
"Reset to suggested constraints"
then, I set the storyboard back to "w Compact h Regular".
hope it could help you.
Upvotes: 0
Reputation: 3103
As @Anil Varghese pointed out the problem is the size of the view. Anything other than wAny hAny will trigger this warning when opening the storyboard file. I think it's an Xcode bug.
So I had to make sure that my views are set up like in the picture above. This means designing for all sizes, so, in my case, my UI got all messed up and i had to redesign it. But it was for the best!
When you change to wAny hAny you view elements will become invisible because they are bound to other size classes (like wCompact hAny). You need to delete those rules from the Attributes inspector.
Upvotes: 4