• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Need to use Quartz... I think?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Need to use Quartz... I think?


  • Subject: Re: Need to use Quartz... I think?
  • From: Steve Christensen <email@hidden>
  • Date: Sat, 07 Mar 2009 23:44:51 -0800

I'm coming in on the middle of this so I don't know if what's already been discussed. How many -unique- images are there? If you're working with a relatively small number of images, you could just cache a single copy of each and then supply the correct image for a particular cell.

If you have image versions that are otherwise identical except for, say, a different background, you could reduce your image requirements to a smaller number of images with a common graphical piece and then one image for each background. Then when you draw, draw a background image then draw the common image on top.

If you really do have a larger number of images, you might be able to get away with either replacing them with a single larger image that has all of the smaller images laid out in a grid, then just draw a portion of that image; or creating a NSBitmapImageRep big enough to hold all the images, making it the current graphics context, drawing the smaller images into it, then draw a portion of the image.

If other solutions won't work to reduce your memory footprint, you may need to reduce the number of images you're working with. Just one of the hazards of working with a small-memory (relatively) device...

steve


On Mar 7, 2009, at 10:35 AM, James Cicenia wrote:

Unfortunately they are not sequential.

They are a graphical calendar with two images per month. They can exist, they can be yellow or they can be green.
So, unfortunately, I can't do that.
:-(



On Mar 7, 2009, at 12:28 PM, David Duncan wrote:

On Mar 7, 2009, at 10:22 AM, James Cicenia wrote:

I am creating a visual indicator.
There can be approximately up to 400 rows.
Each row can have up to 24 little images.


I imagine those images are pretty small if you can fit 24 of them across the screen...

If the images are always displayed in the same order, then the simplest method might be something like this:
Create a single image with all of your little images side by side in the correct order
Create a UITableView
For each UITableViewCell, embed a single opaque UIImageView.
Assign the indicator UIImage as the content of that UIImageView
Size the UIImageView to expose the number of indicators you desire and set its contentMode to UIViewContentModeLeft.


If the indicators can appear in any order, you probably would still want to do this in a UITableView, but you probably have more work.

_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:
This email sent to email@hidden


References: 
 >Need to use Quartz... I think? (From: James Cicenia <email@hidden>)
 >Re: Need to use Quartz... I think? (From: David Duncan <email@hidden>)
 >Re: Need to use Quartz... I think? (From: James Cicenia <email@hidden>)
 >Re: Need to use Quartz... I think? (From: David Duncan <email@hidden>)
 >Re: Need to use Quartz... I think? (From: James Cicenia <email@hidden>)

  • Prev by Date: Re: Binding to table with variable number of columns
  • Next by Date: problem observing selectionIndex of an array controller
  • Previous by thread: Re: Need to use Quartz... I think?
  • Next by thread: Can an object observe itself?
  • Index(es):
    • Date
    • Thread