• 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: How to redraw a view in slow-motion
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to redraw a view in slow-motion


  • Subject: Re: How to redraw a view in slow-motion
  • From: Matthias Arndt <email@hidden>
  • Date: Sun, 19 Jun 2011 15:57:27 +0200

Hi Ken,

Am 19.06.2011 um 15:40 schrieb Ken Tozier:

> - (void)observeValueForKeyPath:(NSString *) inKeyPath
> 		ofObject:(id) inObject
> 		change:(NSDictionary *) inChange
> 		context:(void *) inContext
> {
>     if ([inKeyPath isEqualToString: @"subsetRange"])
>     {
>         // figure out how many lines you still have to draw here
>         if (stillHaveLinesToDraw == YES)
>         {
>             sleep(<some number of ticks>);
>             [self setNeedsDisplay: YES];
>         }
>     }
> }

Thanks for this speedy reply! Using a KVO observer is a new approach I haven't considered, yet. But the main difference to my first idea is the usage of repetitive invocations of "drawRect:" instead a loop inside the method itself. To make this a slow-motion, you mentioned a "sleep(...)" (wasn't included in the mailing list reply), which will freeze the GUI, won't it?

CAAnimation sounds promising, unfortunately I haven't used it before, and animating several paths doesn't seem to be covered with basic animations ... I'd look deeper into the references, but currently I'm afraid it's beyond my capabilities.

Matthias_______________________________________________

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: How to redraw a view in slow-motion
      • From: Ken Tozier <email@hidden>
References: 
 >How to redraw a view in slow-motion (From: Matthias Arndt <email@hidden>)

  • Prev by Date: Non-rectangular image of NSView for dragging
  • Next by Date: Re: Synthesised properties and additional actions
  • Previous by thread: Re: How to redraw a view in slow-motion
  • Next by thread: Re: How to redraw a view in slow-motion
  • Index(es):
    • Date
    • Thread