Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个带有一些按钮的简单 UIImageView。当我旋转 iPad 模拟器时,按钮不会调整大小。我该如何解决?
PS:我使用的是 Xcode 4.5,如您所知,它在界面构建器中没有自动调整大小的遮罩(尺寸检查器中的画布,我们只需单击箭头并进行遮罩),之前已包含这些遮罩。
button.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleBottomMargin | UIViewAutoresizingFlexibleRightMargin;