• 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: drawRect is erasing view
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: drawRect is erasing view


  • Subject: Re: drawRect is erasing view
  • From: "Kyle Sluder" <email@hidden>
  • Date: Thu, 14 Aug 2008 16:51:19 -0400

On Thu, Aug 14, 2008 at 4:42 PM,  <email@hidden> wrote:
> I'm trying to do some animation where each time drawRect is called it's
> drawing over what was previously drawn, but something is erasing the view.
>  I've setBackgroundColor for the window to clearColor so it's no longer
> drawing the default stripes but now it's erasing to black.

Two things:

1) If you do not completely fill your view with drawing, you must
override -isOpaque to return NO.
2) When -drawRect: is called, you are responsible for drawing anything
and everything that should be drawn in that rectangle.  You cannot
make any assumptions that anything is left in there from a previous
drawing operation.

--Kyle Sluder
_______________________________________________

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: 
 >drawRect is erasing view (From: email@hidden)

  • Prev by Date: Re: CoreData, Object/Array Controllers and KVO
  • Next by Date: Re: @try @catch
  • Previous by thread: drawRect is erasing view
  • Next by thread: Re: drawRect is erasing view
  • Index(es):
    • Date
    • Thread