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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T21:41:46+00:00 2026-05-27T21:41:46+00:00

The delegate is my view controller. I am setting the delegate via: CABasicAnimation theAnimation;

  • 0

The delegate is my view controller.

I am setting the delegate via:

CABasicAnimation theAnimation;
theAnimation.delegate = self;

Then I configure the animation and add the animation to the layer, and I verified it is animating correctly on the device.

However, I cannot get this delegate method to be called:

-(void)animationDidStop:(CAAnimation *)anim finished:(BOOL)flag {
    NSLog(@"animationDidStop called.");
}

Any ideas?

Also, I could not find anywhere the protocol my view controller adopts for the CAAnimation delegate methods. I thought all delegate objects had to adopt a protocol?

Thank you!

  • 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-27T21:41:46+00:00Added an answer on May 27, 2026 at 9:41 pm

    Also, I could not find anywhere the protocol my view controller adopts for the CAAnimation delegate methods. I thought all delegate objects had to adopt a protocol?

    Delegation and formal protocols are orthogonal concepts:
    Formal protocols are a pretty recent addition to the Objective-C programming language — as a matter of fact, they were introduced after CoreAnimation (née LayerKit).

    The way of doing things prior to the introduction of @protocol — and the way QuartzCore still works — was declaring a category on NSObject as a so called “Informal Protocol”. It is only recently that Apple started formalizing these — see NSURLConnection for such an example, which gained it’s delegate protocols with the current releases of iOS/OS X.

    After this brief aside on history, now to your problem:

    If what you are showing is a verbatim copy of your code, then that cannot work. In fact, if you aren’t using ARC you are pretty lucky that the above code doesn’t crash due to a EXC_BAD_ACCESS. You should totally set the value of animation to something meaningful before trying to send messages to it…

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

Sidebar

Related Questions

I have two view controller classes in my application delegate. I can change from
I set the view controller to be the delegate of a local variable ASIHTTPFormDataRequest
Are there any differences in performance by setting the Root View Controller in IB
I have the problem that my view controller class has too many delegates and
I'm not sure why this is happening, but in the App delegate, I'm setting
This has me scratching my head. I have a view controller that implements UIPopoverControllerDelegate
I have a view controller that has three scroll views as subviews. I would
I've spend an inordinate amount of time searching for a view-controller that will bring
i'm transitioning to a new view, i present the new view and then call
I have a view controller myViewController that makes HTTP requests. I set the request's

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.