UITableView Custom cell with image

2009-09-22 Thread Development
I have a UITableViewCell with a UIImageView that's 44X44 pixels. I'm  
loading three different tables with a total of around 200 images none  
of which are more than 100k.
So. My problem is memory warnings that cause the app to quit quite  
unceremoniously. I have tried loading the image when the cell is  
viewed. That makes an ugly stutter. And no help with memory warnings.  
I have tried storing the image in memory and simple adding the image  
to the UIImageView when the cell is returned. Same problem, lots of  
stutter and memory warnings.


What can I do to have the image in the cell, without the memory  
problems?
 
___


Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: UITableView Custom cell with image

2009-09-22 Thread Rick Genter


On Sep 22, 2009, at 12:26 PM, Development wrote:

I have a UITableViewCell with a UIImageView that's 44X44 pixels. I'm  
loading three different tables with a total of around 200 images  
none of which are more than 100k.
So. My problem is memory warnings that cause the app to quit quite  
unceremoniously. I have tried loading the image when the cell is  
viewed. That makes an ugly stutter. And no help with memory  
warnings. I have tried storing the image in memory and simple adding  
the image to the UIImageView when the cell is returned. Same  
problem, lots of stutter and memory warnings.


What can I do to have the image in the cell, without the memory  
problems?


Don't load all of the images into memory. 200 images X 100K/image =  
20MB. I don't think iPhone applications can use that much memory  
successfully.

--
Rick Genter
rick.gen...@gmail.com





___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: UITableView Custom cell with image

2009-09-22 Thread Ricky Sharp
Please post your code. One app I have displays a list of 1,089 items.  
Three rows are visible on the screen and each row displays an image of  
size 89 x 128.


I use the standard method of reusing table cells and simply assign the  
image only when the cell is to be displayed. There is some stuttering,  
but only if I try to flick through the list very fast. Normal swipes  
are fluid. This is also on a 3G iPhone.


Sent from my iPhone

On Sep 22, 2009, at 2:26 PM, Development developm...@fornextsoft.com  
wrote:


I have a UITableViewCell with a UIImageView that's 44X44 pixels. I'm  
loading three different tables with a total of around 200 images  
none of which are more than 100k.
So. My problem is memory warnings that cause the app to quit quite  
unceremoniously. I have tried loading the image when the cell is  
viewed. That makes an ugly stutter. And no help with memory  
warnings. I have tried storing the image in memory and simple adding  
the image to the UIImageView when the cell is returned. Same  
problem, lots of stutter and memory warnings.


What can I do to have the image in the cell, without the memory  
problems?

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/rsharp%40mac.com

This email sent to rsh...@mac.com

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: UITableView Custom cell with image

2009-09-22 Thread Luke the Hiesterman
First, you should be reusing table cells as a basic first step. If  
you're not doing that, start now. Second, you should solve your  
stutter problem by returning the cell right away and asynchronously  
loading the image into the cell. If you don't hold up cell creation/ 
display on loading of the image, you won't have stutter, and you can  
then add the image to the cell when it's ready.


Luke

On Sep 22, 2009, at 12:26 PM, Development wrote:

I have a UITableViewCell with a UIImageView that's 44X44 pixels. I'm  
loading three different tables with a total of around 200 images  
none of which are more than 100k.
So. My problem is memory warnings that cause the app to quit quite  
unceremoniously. I have tried loading the image when the cell is  
viewed. That makes an ugly stutter. And no help with memory  
warnings. I have tried storing the image in memory and simple adding  
the image to the UIImageView when the cell is returned. Same  
problem, lots of stutter and memory warnings.


What can I do to have the image in the cell, without the memory  
problems?

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/luketheh%40apple.com

This email sent to luket...@apple.com


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com