Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8406041
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T22:59:25+00:00 2026-06-09T22:59:25+00:00

I can implement an animation using animator in mac os cocoa, like [[view animator]

  • 0

I can implement an animation using animator in mac os cocoa, like

[[view animator] setFrame:newFrame];

but my problem is I have to animate some points which are properties of view. I can do it like the following iPhone code:

[UIView animateWithDuration:0.3 animations:^{
                                for (Point point in self.points) {
                                    point.x += 10;
                                }
                           } completion:^(BOOL finished) {

                                }];
                            }];

I want to know how can I do this in mac ox cocoa?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T22:59:27+00:00Added an answer on June 9, 2026 at 10:59 pm

    Usually for NSView animation you have to override standart animation, that is used by animator.

    CABasicAnimation* animation = [CABasicAnimation animation];
    animation.delegate = yourDelegate;
    NSDictionary *animations = [NSDictionary dictionaryWithObjectsAndKeys:animation,@"frameSize",nil];
    [view setAnimations:animations];
    

    The key for the animation is the property you want to animate.

    If you don’t need delegate you can use such code:

    [CATransaction begin];
    [CATransaction setAnimationDuration:0.5];
    [CATransaction setAnimationTimingFunction:[CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseOut]];
    [[view animator] setFrameOrigin:origin];
    [CATransaction commit];
    

    If you need more complex animations you can create an overlay window with layer hosting contentview and animate layers with a view screenshot inside.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How can I implement a custom swipe animation instead of the standard horizontal movement?
I can implement both variants - it's easy. But I'm interested: what approach is
How can implement reordring in winforms datagridview by using the feature of drag and
I'd like to know if I can implement a method on MemoryCache that removes
I'm using core animation to transition between different view states in my application. However,
I have to implement an audio (VU) meter using Javascript. This concept should be
I have a text view i need to marquee those along the screen(like the
for example ,when I'm using transient to implement a 2s duration animation by change
How do you implement kCATransitionPush using CAAnimation subclasses in iOS? CAAnimation *animation; // How
I am using iOS 5 to implement an app. In this app I have

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.