2016-05-24 10 views
0

このタイプの質問は何度も尋ねられていますが、まだ理解できないのは、標準を決める方法があることです。私はpngで画面のデザインを持っているとしましょう。 enter image description hereiOS - 資産のサイズ

ここで、イメージビューで設定するスタティックサンプルイメージのイメージビューとサイズ(1xまたは2xまたは3x)のサイズを決定するにはどうすればよいですか。

+0

ために、このリンクをチェックアウトuは、画面全体の上記のようなPSD年代を入手できますか? – Harris

答えて

0
Normally when you are developing u get a folder which has all three 
resolutions of the same asset that you when drop in the xcassets, can 
see that 1x 2x and 3x automatically lie themselves in the respective shelf. 

1x is for iphone <= 4s 
2x normally is for iphone 5,5s,6,6s 
3x normally is for 6 plus, ipad etc. 

今、どのように把握しなければなりませんか?このために:

Step 1 : Determine the screen size for which the design has been originally made, you'd be better off if u start with the smallest screen size (its comparatively simpler to scale small to big) 

Step 2 : Open the design in mac **preview** app and select and drag any part. It'll show you the dimensions. Divide those by 2 and that's the size of the **uiimageview** you want. For example : 

this shows the boundaries of my image so 93 by 34 is the size of my imageview to hold the asset perfectly

良い https://developer.apple.com/library/ios/documentation/UserExperience/Conceptual/MobileHIG/IconMatrix.html