• 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
Fwd: UIView retain past drawing?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Fwd: UIView retain past drawing?


  • Subject: Fwd: UIView retain past drawing?
  • From: Brad Garton <email@hidden>
  • Date: Sun, 30 May 2010 17:30:37 -0400

To answer my own question:  draw to a bitmap offscreen, and then draw that into the UIView rect.  The bitmap isn't cleared (unless done explicitly).

brad
http://music.columbia.edu/~brad


On May 30, 2010, at 2:36 PM, Brad Garton wrote:

> Hello cocoa-dev list:
>
> My apologies if this is incorrect and/or totally misinformed for this list, but I seem to be missing something obvious.  In my application I've subclassed UIView and use the -drawRect:/-setNeedsDisplay approach to draw lines into the view.  Is there a way to set up the drawing such that it adds to the existing image instead of redrawing all of it?  For example, if I generate a random line in each -setNeedsDisplay invocation of -drawRect, I'd like to retain in the resulting image the lines previously drawn.
>
> thanks--
>
> brad
> http://music.columbia/edu/~brad
>


_______________________________________________

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

  • Follow-Ups:
    • Re: UIView retain past drawing?
      • From: Alastair Houghton <email@hidden>
  • Prev by Date: UIView retain past drawing?
  • Next by Date: Re: Value Transformer with multiple Model Key Paths
  • Previous by thread: UIView retain past drawing?
  • Next by thread: Re: UIView retain past drawing?
  • Index(es):
    • Date
    • Thread