• 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: Pause during drawing
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Pause during drawing


  • Subject: Re: Pause during drawing
  • From: Siegfried <email@hidden>
  • Date: Wed, 10 Nov 2010 16:21:06 -0200

On 10/11/2010, at 03:01, Graham Cox wrote:
>
> On 10/11/2010, at 4:23 AM, Siegfried wrote:
>
>> The question is:
>> Is it possible to "pause" after each call…?
>
> Yes, but you need to refactor your code. Just inserting a delay while drawing is a bad idea and won't work.
>
> Set up a timer that calls every 0.25 seconds. Each time the timer fires, increment an ivar that controls which level of triangle is being drawn, and mark the display as needing refresh (-setNeedsDisplay:). Then, in-drawRect:, use the 'current triangle' ivar to do the relevant part of the drawing.
>
> --Graham
>

Thanks Graham, nice approach.

Siegfried

_______________________________________________

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: 
 >Pause during drawing (From: Siegfried <email@hidden>)
 >Re: Pause during drawing (From: Graham Cox <email@hidden>)

  • Prev by Date: RE: Moderator - Re: iPad 4.2 (deploy to 3.2.2) error
  • Next by Date: Re: Moderator - Re: iPad 4.2 (deploy to 3.2.2) error
  • Previous by thread: Re: Pause during drawing
  • Next by thread: Problem with redirecting stdout
  • Index(es):
    • Date
    • Thread