iPhone: UIImage imageNamed doesn't show the image

前端 未结 5 555
自闭症患者
自闭症患者 2020-12-20 02:25

\"enter

Hi,

I am trying to use the attached image in an UITableView cell. Imag

5条回答
  •  借酒劲吻你
    2020-12-20 02:59

    I had that kind of problem lots of time. 90% times it was distraction errors :) There are lots of possible reasons. Here's are the ones I've seen :

    • You forgot to include the image to bundle
    • Your image is corrupted
    • You are using photoshop and you saved your image to PSD with a png extension (mac OS show preview of PSD files).
    • You forgot to add your view to a superview (arrives sooo often)
    • Wrong file name (imageName.png instead of imagename.png)
    • (from Ankit Srivastava) no memory allocated to imageview
    • ... if I remember some other i'd edit the post.

    Hope this helps

提交回复
热议问题