开发者

How can I adjust a UIView for landscape orientation?

I have a UITableViewController with a custom UIView as a subview. When I rotate the iPhone from portrait to landscape orientation the UIView subview rotates correctly but does not resize correctly. How can I resize the custom开发者_如何学运维 UIView when the device is rotated?


Set the UIView's autoresizingMask like so:

myView.autoresizingMask = UIViewAutoresizingFlexibleWidth|UIViewAutoresizingFlexibleHeight;

This should mean that the view resizes itself automatically on rotation.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜