通用布局与不同的iPhone/iPad故事板 [英] Universal layout vs different iphone/ipad storyboards

查看:112
本文介绍了通用布局与不同的iPhone/iPad故事板的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

可以将不同的故事板用于不同的屏幕尺寸吗? 我只是无法让我的png和图标图像在一个情节提要中都能通用,这很痛苦!

Is it okay to use different storyboards for different screensizes? I just can't make my png and icons images work for one storyboard as universal, it's a pain!

通用iPhone和iPad通用呢?最好的方法是什么?

What about universal iPhone and universal for iPad? What's the best way?

谢谢

推荐答案

您还可以使用一个故事板,并根据需要设置布局和字体.

You can also use one storyboard and set layout and font according to your requirements.

1)要为iPhone和iPad正确设置布局,您需要使用高宽比.您可以通过以下两个链接详细查看答案:

1) To set up layout properly for both iPhone and iPad, you need to use Aspect Ratio. You can check the answer in detail following these two links:

1) 应该给予哪些限制以增加imageview的大小 关于设备屏幕尺寸而不降低图像 清晰度

1) What constraints should be given to increase size of imageview with respect to device screen size without reducing image clarity

2) 计算所有尺寸的iphone的宽高比 -它 将同时适用于iPhone和iPad.

2) Calculating Aspect Ratio for all sizes of iphone - It will work for both iPhone and iPad.


2)要为iPhone和iPad设置不同的字体大小,情节提要中有一项设置,请检查图像.


2) To set different font size for iPhone and iPad, there is a setting in your storyboard, check the image.

标签附近有 + 符号.对于 iPad ,您需要设置常规高度和常规宽度.对于iPhone,它将采用常规字体大小. (AnyHeight,AnyWidth).

there is the + symbol near your Label. For iPad, you need to set Regular height and regular width. And for iPhone it will take regular font size. (AnyHeight , AnyWidth).

检查屏幕截图以更好地理解.

Check the screenshots for better understanding.

输出:-

结论是,您不需要为iPhone和iPad使用不同的故事板.希望这个答案对您有帮助.

As a conclusion, you don't need to take different storyboards for iPhone and iPad. I hope this answer will help you.

这篇关于通用布局与不同的iPhone/iPad故事板的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆