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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T17:42:20+00:00 2026-05-24T17:42:20+00:00

In Core Animation framework, why the methods beginAnimations:context: and commitAnimations are class methods of

  • 0

In Core Animation framework, why the methods beginAnimations:context: and commitAnimations are class methods of UIView?
Why not being instance methods so we code:

[widget beginAnimations:@""];
[widget commitAnimations];

instead of:

[UIView beginAnimations:@"" context:widget];
[UIView commitAnimations];
  • 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-24T17:42:20+00:00Added an answer on May 24, 2026 at 5:42 pm

    The beginAnimations:context: class method begins an animation “block”:

    [UIView beginAnimations:@"" context:nil];
    view1.frame.x = 10;
    view2.opacity = 0.5;
    [UIView commitAnimations];
    

    With the above snippet, view1 and view2 will animate the changes inside that block.

    The context property is NOT the view you want to animate, just information that can be accessed via the delegate methods.

    context

    Custom data that you want to associate with this set of
    animations. information that is passed to the animation delegate
    messages—the selectors set using the setAnimationWillStartSelector:
    and setAnimationDidStopSelector: methods.

    http://developer.apple.com/library/ios/#documentation/uikit/reference/UIView_Class/UIView/UIView.html

    As a sidenote, this way of performing animations is discouraged in iOS4 and above. If you need to target older iOS versions, check the flag:

    #if NS_BLOCKS_AVAILABLE
        // iOS4 and above
    #else
        // iOS3
    #endif
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following core animation code in my app : -(void)startCoreAnimation [UIView beginAnimations:@IconFade
Is their any apple sample code to implement coverflow in MacOS. Apple core animation
Any tutorials or sample code to get the Core Animation window flip effect? I'm
Does anyone know if there is a framework for dynamically loading core animation sequences
Using Core Animation, I would like to fold a UIView (i.e. it's CALayer )
If I'm looking to use Core Animation to fade a view in and out
I can't figure out where core animation on iPhone OS 3.1.2 is defined. Anybody
Is it possible to use Core Animation to change something else than properties of
I'm working on a Cocoa project using Core Animation and I've got a custom
Instruments tells that there are misaligned images which are animated by core animation. What

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.