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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T05:44:48+00:00 2026-05-18T05:44:48+00:00

I have one image in circular format and i want to rotate in circular

  • 0

I have one image in circular format and i want to rotate in circular way when i touch it so can any one tell me what i have to do and give me some source code

thank to all,..

  • 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-18T05:44:49+00:00Added an answer on May 18, 2026 at 5:44 am

    try something like this.

    - (void)spinButton
    {
        [CATransaction begin];
        [CATransaction setValue:(id)kCFBooleanTrue forKey:kCATransactionDisableActions];
        CGRect frame = [button frame];
        button.layer.anchorPoint = CGPointMake(0.5, 0.5);
        button.layer.position = CGPointMake(frame.origin.x + 0.5 * frame.size.width, frame.origin.y + 0.5 * frame.size.height);
        [CATransaction commit];
    
        [CATransaction begin];
        [CATransaction setValue:(id)kCFBooleanFalse forKey:kCATransactionDisableActions];
        [CATransaction setValue:[NSNumber numberWithFloat:2.0] forKey:kCATransactionAnimationDuration];
    
        CABasicAnimation *animation;
        animation = [CABasicAnimation animationWithKeyPath:@"transform.rotation.z"];
        animation.fromValue = [NSNumber numberWithFloat:0.0];
        animation.toValue = [NSNumber numberWithFloat:2 * M_PI];
        animation.timingFunction = [CAMediaTimingFunction functionWithName: kCAMediaTimingFunctionLinear];
        animation.delegate = self;
        [button.layer addAnimation:animation forKey:@"rotationAnimation"];
    
        [CATransaction commit];
    }
    
    - (void)animationDidStop:(CAAnimation *)theAnimation finished:(BOOL)finished
    {
        if (finished)
        {
            [self spinButton];
        }
    }
    

    End the animation by calling something like

    - (void)setButtonImage:(UIImage *)image
    {
        [button.layer removeAllAnimations];
        if (!image)
        {
            [button setImage:[UIImage imageNamed:@"playbutton.png"] forState:0];
        }
        else
        {
            [button setImage:image forState:0];
    
            if ([button.currentImage isEqual:[UIImage imageNamed:@"loadingbutton.png"]])
            {
                [self spinButton];
            }
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have one image animation started using GameQuery. Now I want to stop the
I have one big buffer image. I want to create another buffer image with
I have a program that reads one image file, makes some changes on that
There is one image on LinearLayout. I have to move that image in any
i have one image and i want that when i will home mouse on
I have one image. i want that when someone scrolls the browser window then
I have one image website where users can vote images. IMAGES ARE RANDOMLY GENERATED
I have one image with multiple colors. I want to change a specific color
I have one image view, I set the image on it. I want to
I have one image and one button in my application. i want to add

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.