简体   繁体   English

iOS为iPhone 4和5制作通用应用程序

[英]iOS make universal app for iPhone 4 and 5

Quick question. 快问。 For iOS in Xcode I want to make an app that looks good on the iPhone 5 and the iPhone 4. I am using story boards. 对于Xcode中的iOS,我想制作一款在iPhone 5和iPhone 4上看起来不错的应用程序。我正在使用故事板。 All I know is when you click the button on the bottom of the storyboard page with the two arrows on both sides of an iPhone it changes the views of the app from 4 inch to 3.5 or vise versa. 我所知道的是,当您单击故事板页面底部的按钮时,iPhone两侧的两个箭头会将应用程序的视图从4英寸更改为3.5,反之亦然。 This usually makes it look messed up because if I made the app with an iPhone 5 screen it looks weird on the iPhone 4 screen. 这通常会使它看起来搞砸了,因为如果我用iPhone 5屏幕制作应用程序,它在iPhone 4屏幕上看起来很奇怪。 Preferably without using code and just using storyboards, how do I make an app that is universal for the iPhone 4 and the iPhone 5. Basically like making an app universal for the iPhone and iPad where there are 2 storyboards (one for the iPhone and one for the iPad) how do I do that for the iPhone 4 and iPhone 5 (one story board for the 4 inch screen and one for the 3.5 inch screen)? 最好不使用代码,只使用故事板,如何制作适用于iPhone 4和iPhone 5的通用应用程序。基本上就像为iPhone和iPad制作通用应用程序,其中有2个故事板(一个用于iPhone和一个对于iPad)我如何为iPhone 4和iPhone 5(4英寸屏幕的一个故事板和3.5英寸屏幕的一个故事板)做到这一点?

Thank you 谢谢

Use autolayouts to format your views. 使用自动布局来格式化您的视图。

Those arrows are only to simulate the view. 这些箭头只是为了模拟视图。 They are not view holders. 他们不是观看者。

Check: https://developer.apple.com/library/ios/documentation/userexperience/conceptual/AutolayoutPG/Introduction/Introduction.html 检查: https//developer.apple.com/library/ios/documentation/userexperience/conceptual/AutolayoutPG/Introduction/Introduction.html

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

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