开发者

UIView in iPhone rotation

开发者 https://www.devze.com 2023-01-07 10:41 出处:网络
My app looks like this: UIViewController -> UIScrollView -> UIView Everything works well when user is rotating device.

My app looks like this:

UIViewController -> UIScrollView -> UIView

Everything works well when user is rotating device.

However, if user rotates device to vertical and then other view is added AFTER user rotated device, new vie开发者_Go百科w is still in Portrait mode!

Any ideas what is wrong?


When addin the view, you have to manually adjust it's frame. Autoresizing only works when the view is part of a view hierarchy.

0

精彩评论

暂无评论...
验证码 换一张
取 消