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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T02:25:04+00:00 2026-05-30T02:25:04+00:00

I want to rotate the three buttons in circular direction so that the Selected

  • 0

I want to rotate the three buttons in circular direction so that the Selected button will come to the center and other respective button will get swap accordingly.

Means to be more specific–> If I click on “button 2” it will come to center ie. at current position of “button 3”, and “button 3” will be swap to “button 1” likewise.

And after that If i again click on that button(Button 2) it should go to the next page(Next ViewContoller).

Can anyone help me out to achieve this.

If possible please provide any sample code or link for a sample application.

  • 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-30T02:25:06+00:00Added an answer on May 30, 2026 at 2:25 am

    Let’s say that you have your 3 buttons declared as ivars, then you need to do something like this:

    - (void)rotateLeft {
        CGRect frame1 = button1.frame;
        CGRect frame2 = button2.frame;
        CGRect frame3 = button3.frame;
        [UIView animateWithDuration:.5 animations:^{
            [button1 setFrame:frame3];
            [button2 setFrame:frame1];
            [button3 setFrame:frame2];
        }];
    }
    
    - (void)rotateRight {
        CGRect frame1 = button1.frame;
        CGRect frame2 = button2.frame;
        CGRect frame3 = button3.frame;
        [UIView animateWithDuration:.5 animations:^{
            [button1 setFrame:frame2];
            [button2 setFrame:frame3];
            [button3 setFrame:frame1];
        }];
    }
    
    - (IBAction)buttonPressed:(id)sender {
        UIButton* clicked = (UIButton*)sender;
        if (clicked.frame.origin.x == 20) {
            [self rotateLeft];
        } else if (clicked.frame.origin.x == 228) {
            [self rotateRight];
        } else {
            [self.navigationController pushViewController:[[NextController alloc] init] animated:YES];
        }
    }
    

    This uses the frame property to detect which way to rotate. But you should get the general idea from this.

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

Sidebar

Related Questions

I have a great problem about the rotation in three.js I want to rotate
My problem is that I want to rotate the UIImageView of a UIButton .
I have an object which I first want to rotate (about its own center)
I want to rotate the image around its center point.The problem i am facing
In my android project I have an image that i want to rotate it
I want to rotate the div, but with a handle ( button on its
I want to rotate an object in 3D space, so that the front side
I want to rotate the log like in mySQL, but now for an H2
I want to rotate imageview with continuously looping on android.my code rotate is working
I want to rotate a single word of text by 90 degrees, with cross-browser

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.