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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T09:22:10+00:00 2026-06-06T09:22:10+00:00

I am changing the UIButton image on button click but it gets postion changes

  • 0

I am changing the UIButton image on button click but it gets postion changes from original to left side. I don’t know why this is happening.
Below is the button. When I select the second button, it changes image and gets to the left side. How do I fix this error ?

Below is my code

  -(IBAction)locationOneButtonAction{


UIImage *buttonImage = [UIImage imageNamed:@"radiogreen.png"];

UIImage *buttonImageOne=[UIImage imageNamed:@"radiowhite.png"];


[locationOneButton setImage:buttonImage forState:UIControlStateNormal];

[locationOneButton setImage:buttonImage forState:UIControlStateNormal];


[locationThreeButton  setImage:buttonImageOne forState:UIControlStateNormal];
[locationTwoButton  setImage:buttonImageOne forState:UIControlStateNormal];

[locationFourButton  setImage:buttonImageOne forState:UIControlStateNormal];

[locationFiveButton  setImage:buttonImageOne forState:UIControlStateNormal];
[locationSixButton  setImage:buttonImageOne forState:UIControlStateNormal];


resturantLocation=@"Common Man - Bedford, MA";

}

  • 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-06T09:22:11+00:00Added an answer on June 6, 2026 at 9:22 am

    I am not hundred percent sure about your case but it usually happen because of transparent space in both images, please overlap your images in Photoshop and make sure both images should have same margins and also should be of same size.

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

Sidebar

Related Questions

I want to change the image in image view on button click but it
I've seen a lot of info on changing the button image for selected but
I am having difficulty in changing the image of my UIButton which is contained
I am changing UIButton font size but it does not effect. UIButton*headingButton=[UIButton buttonWithType:UIButtonTypeCustom]; headingButton.frame=CGRectMake(182,
Changing the size of an Image Widget in GWT changes the size of the
When changing the VCS for my project FakeItEasy from SVN to Mercurial on Google
After changing the import as a from-import i'm running into this error: from datetime
Very similar to Changing one byte in a file in C , but in
I'm changing my project from working with Linq-to-SQL to working with Entity Framework. I
What is the best way to go about changing the dimensions of a UIButton

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.