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.
如何分别更改 iPhone 4 屏幕尺寸的按钮尺寸?这些按钮非常适合 iPhone 5 的屏幕尺寸,但不适合 iPhone 4 的屏幕尺寸。所以我可能需要单独调整 iPhone 4 的按钮尺寸,除非我在这里遗漏了什么。
嗨,对于 iphone 4,您可以使用自动调整大小的蒙版或约束,或者您可以检测视图高度并更改按钮的框架
if(self.view.height == 568.0) { //Set frame for iphone 5 } else { //Set frame for iphone 4 }