简体   繁体   English

iOS UIDesign for All resolution

[英]iOS UIDesign for All resolution

I am working on Xcode 5.1.1.我正在研究 Xcode 5.1.1。 My app works fine on all resolutions including latest iPhone6 and 6Plus.But my problem is the images are stretched in new resolutions.我的应用程序适用于所有分辨率,包括最新的 iPhone6 和 6Plus。但我的问题是图像在新分辨率下被拉伸。

For example,例如,

I am having image with the pixels of 200*75.How to set this image for iPhone 3.5 inch,4 inch,4.7 and 5.5 screens?我的图像像素为 200*75。如何为 iPhone 3.5 英寸、4 英寸、4.7 和 5.5 屏幕设置此图像?

My designs are based on 3.5 inch screen.But my designer gave me the image(200*75) from iPhone6 plus screen design.How to fit the image for all resolutions?我的设计是基于 3.5 英寸的屏幕。但是我的设计师给了我 iPhone6 加上屏幕设计的图像(200*75)。如何适应所有分辨率的图像?

Any help would be greatly appreciated.任何帮助将不胜感激。

Thanks.谢谢。

尝试这个

 self.imageView.contentMode=UIViewContentModeScaleToFill;

We will need to apply auto layout + constraints in UI design so the app will support all devices.我们需要在 UI 设计中应用自动布局 + 约束,以便应用程序支持所有设备。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM