UIView - 居中对齐 UIView 的所有内容?
如何居中对齐视图的所有内容。当我旋转 iPad 时,内容未自行居中对齐,如何解决此问题?
谢谢!!!
How to center alignment all the contents of view. When i am rotating iPad contents are not align center it self how to resolve this problem??
Thanks!!!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
提供
didRotateFromInterfaceOrientation
方法的实现并将所有子视图居中。Provide an implementation of the
didRotateFromInterfaceOrientation
method and center all subviews.您应该以编程方式更改横向和纵向模式的内容框架。
您可以尝试这样做:
You should change programmatic-ally the contents' frame for both Landscape and portrait modes.
You can try this as: