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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T15:40:15+00:00 2026-05-20T15:40:15+00:00

I am drawing a pie graph and on tap, I am rotating it to

  • 0

I am drawing a pie graph and on tap, I am rotating it to the next pie with

CGContextRotateCTM(context, degreesToRadians(mAngle)).

Is there a way to animate this transition? Could you please post an example?

  • 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-20T15:40:15+00:00Added an answer on May 20, 2026 at 3:40 pm

    I think if you really want rotate your chart just changing drawing code you’ll need to create a timer and change rotation angle in its method and also make view redraw there.

    Instead of applying rotation in drawing code I’d rotate the view with chart itself if that’s possible – either with UIView animations or with CALayer animations – they are pretty straightforward and provide much more flexibility. e.g.

    [UIView animateWithDuration:1.0f 
                     animations:^{
                         view.transform = CGAffineTransformMakeRotation(mAngle);
                     }];
    

    Will rotate your view on mAngle with animation during 1 sec (method is available starting iOS4). Also if you want to rotate your view by 360 degrees or more you’ll need to use CALayer animation (check this question for details).

    Also using standard animations most likely won’t make your view redraw, so it will be more efficient.

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

Sidebar

Related Questions

Drawing a blank on this, and google was not helpful. Want to make a
I'm trying to understand the math on this raphael.js demo: http://raphaeljs.com/pie.js Checkout the sector
When drawing an editable Polygon on a map using Google's V3 API, is there
On drawing on canvas if i use this code to draw the bitmap then
I am currently drawing a Bitmap to a SurfaceView using Canvas.drawBitmap() . This seems
I'm drawing inspiration from this question: Convert Linq to Sql Expression to Expression Tree
Drawing a blank with finalizing my deploy scheme here. After posting this question: Migrating
I'm drawing to an offscreen framebuffer using glBlendFuncSeparate(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA, GL_ONE, GL_ONE); and drawing this
I have a simple drawing class. There is a view controller that includes a
I am doing manual drawing of text with CGContextShowTextAtPoint() because this text is being

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.