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

  • Home
  • SEARCH
  • 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 8352221
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T08:54:08+00:00 2026-06-09T08:54:08+00:00

I use the CABasicAnimation to animate the rotation of a NSView . The code

  • 0

I use the CABasicAnimation to animate the rotation of a NSView. The code runs well on iPhone and now I want to plant it to the cocoa.


    [self.secondView setWantsLayer:YES];
    CABasicAnimation *anim2 = [CABasicAnimation animationWithKeyPath:@"transform.rotation"];
    anim2.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionLinear];
    anim2.fromValue = [NSNumber numberWithFloat:0];
    anim2.toValue = [NSNumber numberWithFloat:-((360*M_PI)/180)];
    anim2.repeatCount = HUGE_VALF;
    anim2.duration = 8.0;
    [self.secondView.layer addAnimation:anim2 forKey:@"transform"];

When it runs, the view’s frame seems to be covered,like below:

enter image description here

You can see the four vertexes are not shown.

As I’m not so familiar with cocoa, could anyone tell me where is the problem?

Thanks!

  • 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-09T08:54:09+00:00Added an answer on June 9, 2026 at 8:54 am

    I set the configuration in the nib file:
    the secondView is a NSImageView, and makes the view in the Core Animation Layer, but leaves the Image Well unselected.

    But could anyone how to make the configurations in code?
    I can’t find anything in the NSImageView Document.

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

Sidebar

Related Questions

I use CABasicAnimation in my project. I used repeatcount.but i want to change the
use C#,want to upload excel file on google doc. bellow syntax use to upload
When I use : CALayer *hitLayer = [[self.view.window.layer presentationLayer] hitTest:pointOfTouch]; I then explore the
I would like to use this Core Animation code in Cocos2D, or I just
so here is my code : CABasicAnimation *animation = [CABasicAnimation animationWithKeyPath:@path]; animation.duration = 2.0;
Use case: I find a piece of code that I do not understand at
use this code, in the Preferences activity, to know when the reset preference has
We wanted to use a UITabBar in our iPhone app, but with one exception:
when to use CABasicAnimation and CAKeyFrameAnimation and CGAffineTransform?
I've used the code in an IBAction (button press) method: CABasicAnimation *rotateButton; //don't forget

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.