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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T16:05:53+00:00 2026-06-15T16:05:53+00:00

I have a view that has a table view on the top, and a

  • 0

I have a view that has a table view on the top, and a scroll view below the table view.
When I press the resize bar button item, I want to hide the table view and maximize the scroll view. I got the scroll view and table view to animate correctly, but I am trying to resize the UITextView inside the scroll view to take advantage of the extra screen space.

Whenever I calculate the resize, the UITextView goes to the top left corner of the screen, and I’m not sure why. I am not even modifying the X and Y, just the height.

CGRect newDesFrame = descriptionTextView.bounds;
newDesFrame.size.height = newDesFrame.size.height + tableViewFrame.size.height;
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:.5];

self.scrollView.frame = scrollFrame;
self.descriptionTextView.frame = newDesFrame;

[UIView commitAnimations];

I am not sure why this happens. Does the descriptionTextView.bounds get messed up since it’s in a UIView inside a UIScrollView? It seemed that, when I do a NSLog of the X and Y of the scroll view, it’s 0,0. It’s weird since it’s not at 0,0 in the superview, or in the view. How do I fix this?

  • 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-15T16:05:54+00:00Added an answer on June 15, 2026 at 4:05 pm

    descriptionTextView is most likely jumping to the top left because you are, in fact, changing the origin (x and y). You are starting with:

    CGRect newDesFrame = descriptionTextView.bounds;
    

    Getting the bounds of that text view will give you a CGRect with an origin of 0,0, as ‘bounds’ gives you the view’s rectangle in its own, local coordinate space.

    Try this instead:

    CGRect newDesFrame = descriptionTextView.frame;
    

    This will give you the view’s rectangle in its superview’s coordinate space, including the actual origin.

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

Sidebar

Related Questions

I want to have a ViewController that has a table view on the top
So say that I have a table view that has a UINavigationController. On top
I have view a that has a table cell and a save button. If
I have a view that has a tooltip attribute. I want to set that
I have a view MainView that has a navigation bar without any navigation controller,
I have to make a view in an application for a table that has
I have a table view that has embedded UITextFields for entering some data. It
I have a view that has a column to make it sortable. When clicking
I have a view that has multiple views inside it, and an image presentation
Scenario: I have a view that has some DataTemplate resources <DataTemplate x:Key=myDragCueTemplate> <Border Background=Blue

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.