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

  • Home
  • SEARCH
  • 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 338077
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T10:23:45+00:00 2026-05-12T10:23:45+00:00

I have a UIImageView object created in IB, and has an outlet. I want

  • 0

I have a UIImageView object created in IB, and has an outlet. I want to move it, but only change the y value, so I have:

CGFloat x, w, h;
x = image.frame.origin.x;
w = image.frame.size.width;
h = image.frame.size.height;
image.frame = CGRectMake(x, /*formula to figure out new y value*/, w, h);

When this runs, the image simply disappears. Do I have to run some code or something to make it display again? I’ve used this method before to completely move stuff to new positions when the ipod is rotated, and it worked.

Using NSLog(), I know that the y value it is getting is correct and not off the screen.

  • 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-12T10:23:45+00:00Added an answer on May 12, 2026 at 10:23 am

    The above code looks OK, so there has to be something more to the problem. Have you tried getting the frame back out of the UIView once you’ve reset it to make sure the value is still what you’d expect? Also, is there any code anywhere else in your app that is altering state for this UIView (frame, opacity, size, etc.)?

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

Sidebar

Related Questions

I have an object that return a cached image view (UIImageView), which do the
Example: I have an class that inherits from UIImageView. An object creates an instance
I have a custom UIImageView class that creates thumbnails (UIImageView) and each thumbnail has
We know that UIImageView has a very nice support for image sequence animation. We
I have a single image that needs to be placed on multiple UIImageView. I
I have an object that can be moved across the screen with the finger.
I am new to Obj C, but have developed many types of games in
I have a UIImageView based class. At the start of this class, I have
I have a UIImageView based class (lets call it classA) that uses a classB
I have an NSObject that I am using to store/hold properties of an object,

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.