• 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
Flicer while using NSViewAnimation for roll down
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Flicer while using NSViewAnimation for roll down


  • Subject: Flicer while using NSViewAnimation for roll down
  • From: Ankuj Gupta <email@hidden>
  • Date: Tue, 16 Apr 2013 17:26:49 +0530

Hi

I am trying to slide down a NSWindow using NSViewAnimation. I am using the
following code

                NSRect firstViewFrame = [macWindow frame];
                NSViewAnimation *theAnim;

                NSRect newViewFrame;
                NSMutableDictionary* firstViewDict;
                NSMutableDictionary* secondViewDict;
                NSRect newRect(firstViewFrame);
                newRect.size.height = 0;

                firstViewDict = [NSMutableDictionary
dictionaryWithCapacity:3];


                // Specify which view to modify.

                [firstViewDict setObject:macWindow
forKey:NSViewAnimationTargetKey];

                [firstViewDict setObject:[NSValue valueWithRect:newRect]
                forKey:NSViewAnimationStartFrameKey];

               [firstViewDict setObject:[NSValue
valueWithRect:firstViewFrame]
                forKey:NSViewAnimationEndFrameKey];

                // Create the view animation object.

                theAnim = [[NSViewAnimation alloc]
initWithViewAnimations:[NSArray

                arrayWithObjects:firstViewDict, nil]];

                // Set some additional attributes for the animation.

                [theAnim setDuration:0.4];    // One and a half seconds.

                [theAnim setAnimationCurve:NSAnimationEaseIn];

                [theAnim setAnimationBlockingMode:NSAnimationBlocking];

                // Run the animation.

                [theAnim startAnimation];
                //     [macWindow setFrame:newViewFrame display:YES
animate:YES];

                // The animation has finished, so go ahead and release it.

                [theAnim release];

But I see a flicker while animation is going. Is is because I am using the
rect with zero height as starting position or is their some other issue. Is
there some other apis which I can use for animating NSWindow ?

Thanks
Ankuj
_______________________________________________

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

  • Prev by Date: Re: UITableCellView width decreases when scrolling
  • Next by Date: Core Animation with NSWindow
  • Previous by thread: Re: UITableCellView width decreases when scrolling
  • Next by thread: Core Animation with NSWindow
  • Index(es):
    • Date
    • Thread