Images showing in simulator but not on the iPhone device

前端 未结 5 1261
别跟我提以往
别跟我提以往 2021-01-02 12:00

So when I run the application from the device the pictures show up and everything works great. However, when I move to the device I run in about 10 out of 38 pictures that d

5条回答
  •  感情败类
    2021-01-02 12:33

    Generally, if in-memory size was the culprit, your application would crash with a low memory error on the device. However, it seems like the images just don't display.

    One other thing that can be going wrong is the size of the images. UIViews on the iPhone can only have dimensions smaller than the maximum texture size supported by the GPU. Apple states that this is 1024 x 1024, but I've found it to be more like 2048 x 2048 on even the original model iPhone. You may be creating a view for some of these images that exceeds this size in one dimension, but your Mac has a larger maximum texture size on its GPU and so it displays fine in the Simulator.

提交回复
热议问题