How to display images in a tableview
I can display images in a tableview but can't transfer the application on to the iPhone. I am obviously not releasing some memory but can't figure out what. I have approx 30 pix that开发者_Python百科 are each 250k in size. I have tried storing the images in SQLite as well as the filesystem and get the same problem for both; works in the simulator but does not get to the iDevice (touch actually).
Suggestions?
Check your images are in 24bit format if they are PNGs
I think the problem is to do with image formats - not a lot else makes sense.
What do you mean by they are in a tableview - is this relevant? Can you see them when they are not in a tableview?
No Sample code to review, but have made sure that your not allocating or holding the images more than once. 30 pics at 250k is 7.5MB plus the code, so that app starts off hefty. If the images are not being released, the size could be sending Memory Warnings. Do you have an NSLog("Warning Message");
in your application's - (void)didReceiveMemoryWarning {..}
Try setting one if not and then run app in the Simulator with the Console open and double check that MEMORY is not your problem. If that NSLog gets triggered you know that is where the problem is.
I think its too much for the tableview to show this big images on the iPhone. And if it would work you would also have a problem with scrolling performance in the tableview.
精彩评论