Rotational transform and edge constraint

When I was working on bible app, auto layout was working fine in portrait mode. However, there was an exception when I switched to landscape mode.

“Autolayout doesn’t support crossing rotational bounds transforms with edge layout constraints, such as right, left, top, bottom”

I had no idea what did it mean. When I dumped the view hiehrary I found that there was a view called “UILayoutContainerView” which was applied a transformation.

The problem was that I tried to add view with edge constraints to self.view’s parent view, which is “UILayoutContainerView”.

In conclusion, we should only put everything on self.view when using autolayout.

Tagged ,

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: