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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T17:17:51+00:00 2026-06-02T17:17:51+00:00

I I want to create two methods … StartSpin and StopSpin. In StartSpin, I

  • 0

I I want to create two methods … StartSpin and StopSpin. In StartSpin, I need an UIImageView to spin 360 degrees and loop it until I call StopSpin.

Here’s my StartSpin so far…

private void StartSpin () {         
    UIView.Animate (
        1,
        0,
        UIViewAnimationOptions.Repeat,
        () => { 
            CGAffineTransform t = CGAffineTransform.MakeIdentity();
            t.Translate(0, 0);
            t.Rotate((float)(3.14));
            this._imageViewWait.Transform = t;
        },
        () => {}
    );
}

Here’s my two questions…

  1. How do I make it spin 360 degrees?

  2. What command should I use in StopSpin method to stop the spinning?

Thanks

Mojo

  • 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-06-02T17:17:52+00:00Added an answer on June 2, 2026 at 5:17 pm

    To make the image spin, you can use (rotate 1 degree):

    CGAffineTransform rotate = CGAffineTransformMakeRotation( 1.0 / 180.0 * 3.14 );
    [imageView setTransform:rotate];
    

    To make the image spin, simply create a timer the continuously calls this method (and increments the degree). Also, create a bool value to keeps track if you want to keep spinning.

    To stop the spin, simply change the bool value to false. Then, continue updating until you reach the beginning (the degree is 360 or 0) and the bool value is false.

    If you don’t want to continue spinning until the image is back to its original position, just eliminate && degrees == 0

    In code:

    -(void)startSpinning {
        degrees = 0;
        continueSpinning = true;
        [self continueSpinning];
    }
    
    -(void)continueSpinning {
        degrees = (degrees + 1) % 360;
    
        CGAffineTransform rotate = CGAffineTransformMakeRotation( degrees / 180.0 * 3.14 );
        [imageView setTransform:rotate];
    
        if(!continueSpinning && degrees == 0) return;
        else [self performSelector:@selector(continueSpinning) withObject:nil afterDelay:0.1f];
    }
    
    -(void)stopSpinning {
        continueSpinning = false;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

If I want to do bi-directional mapping, do I need to create two mapping?
I want to create two Rest methods that vary based on the query string
I want to create a flat result set from the results of two methods
I want to create a method that takes two variables timeIn and timeOut and
I want to create two widgets in flex. One for the movies ( that
I want to create two and three dimensional vectors using a constructor in a
i am preparing my android apps in which i want to create two row
I want to create a two level ExpandableListView from a local database. The group
I want to create a two-dimensional array in which I want to store records
I want to create a view that contains two forms with their submit buttons.

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.