Home  >  Q&A  >  body text

iOS全屏图片适应问题

要做一个首页(是首页不是开机页),一个全屏图片作为背景。现在苹果出了很多尺寸的手机,怎样才能自适应屏幕呢。
我想到的方法是,根据不同尺寸的屏幕各做一个背景图片,然后判断是什么尺寸,找到相应的图片。
我想知道有没有方法可以自动适应,我觉得背景图应该还是要每个尺寸一张。不知各位高手怎么看~

ringa_leeringa_lee2762 days ago469

reply all(1)I'll reply

  • 阿神

    阿神2017-04-18 09:38:23

    The built-in assert can put 2x, 3x pictures, iOS will take different pictures according to various models, 6SPlus will automatically take 3x pictures, and others will take 2x pictures. However, when the 5 and 6 screen sizes are different, they will automatically adapt to the 2x image, and there will inevitably be some problems with the image accuracy. So what I did was put another 5 size picture. Take different pictures according to the situation. Of course, the size of 4 is not considered here.

    reply
    0
  • Cancelreply