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 1000311
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T07:29:31+00:00 2026-05-16T07:29:31+00:00

In learning Core Animation, I learned very quickly that if you don’t do it

  • 0

In learning Core Animation, I learned very quickly that if you don’t do it right, you get really weird undefined behavior. To that end, I have a few questions that will help me conceptually understand it better.

  • My NSView subclass declares the following in it’s init. This view is a subview of normal layer backed view.

    [self setLayer:[CALayer layer]];
    [self setWantsLayer:NO];
    

    After this, when and in what situations should I refer to self as opposed to [self layer]? I have been ONLY manipulating the layer with explicit and implicit animations, staying away from [self setFrame:] etc. and using [[self layer] setPosition] etc.

  • The problem with this approach is that the actual frame of the view stays in one spot throughout any and all animations applied. What if my view is supposed to recieve mouse events? For example, I have a view that uses core animation and it is dragged around by the mouse. Is there a way I can somehow keep the view frame synced with the current state of the presentation layer so I can receive proper mouse events?

  • About the presentation layer, apparently it’s only available when an actual animation is in progress. Is there any sort of property of the layer that can tell me where it’s ACTUALLY visually at even when an animation’s not in progress?

  • 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-05-16T07:29:31+00:00Added an answer on May 16, 2026 at 7:29 am

    I think you need to re-phrase your question a little. It seems there is some underlying misunderstanding, but you’re not really expressing it very clearly. You’re question title suggests you’re looking to understand something more theoretical, but your actual question suggests you’re looking for something more concrete. Let me see if I can clarify a few things.

    • The presentationLayer provides information about the layer’s current state while “in-flight”.

    • When there is no animation occurring, the presentationLayer and the layer information will be identical. Query the layer’s bounds, frame, or position to find out where it is currently in its parents coordinate space.

    • NSViews must have layer backing enabled to be able to perform animations.

    • Make sure you’re not just animating with an explicit animation and not actually setting the layer value that you’re animating. Animations don’t automatically change the properties of the layers they’re animating. You have to change the property to the ending value yourself or it will just “snap back” to the starting value.

    • If you want to animate the view, as opposed to a layer, you can use the animator proxy, like [[view animator] setFrame:newFrame];

    • Wrap calls to the animator in a CATrasaction to alter things like animation duration.

    Let me know if you need some clarification by updating your question. Providing some pertinent code would really help identify the problems you’re having trouble solving.

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

Sidebar

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.