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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T09:10:51+00:00 2026-05-29T09:10:51+00:00

I would to resize a UITableView and slide up a UIView that contains a

  • 0

I would to resize a UITableView and slide up a UIView that contains a UITextField when this field is fired. These are two simple mockups:

enter image description here
enter image description here

Now I have this code:

- (void)textFieldDidBeginEditing:(UITextField *)textField
{
    [UIView beginAnimations:nil context:NULL];
    [UIView setAnimationDelegate:self];
    [UIView setAnimationDuration:0.3];
    [UIView setAnimationBeginsFromCurrentState:YES];

    [myView setFrame:CGRectMake(myView.frame.origin.x, myView.frame.origin.y - 167, myView.frame.size.width, myView.frame.size.height)]; // 216 (keyboard's height) - 49 (tabbar's height) = 167

    [UIView commitAnimations];
}

- (BOOL)textFieldShouldReturn:(UITextField *)textField
{
    [textField resignFirstResponder];
    [UIView beginAnimations:nil context:NULL];
    [UIView setAnimationDelegate:self];
    [UIView setAnimationDuration:0.3];
    [UIView setAnimationBeginsFromCurrentState:YES];

    [myView setFrame:CGRectMake(myView.frame.origin.x, myView.frame.origin.y + 167, myView.frame.size.width, myView.frame.size.height)];

    [UIView commitAnimations];
    return TRUE;
}

The problem is that the keyboard slide up animation and the myView slide up animation are not synchronous. How to make these two animation perfectly synchronous?

And how to resize the UITableView when the keyboard is visible and return to the original height when keyboard will hide?

  • 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-29T09:10:51+00:00Added an answer on May 29, 2026 at 9:10 am

    The short answer is that you need to subscribe to UIKeyboardWillShowNotification and UIKeyboardWillHideNotification. Those notifications contain the exact parameters of the keyboard animation.

    The long answer is https://stackoverflow.com/a/8704371/77567.

    Regarding your tab bar: the answer I linked assumes you want to slide your view down to the bottom edge of the screen when the keyboard is dismissed. Since you want to slide it down to the edge of the tab bar, you need to look at whether the keyboard is hiding or showing (by checking note.name). If it’s showing, you should save the current frame of the view in an instance variable. If it’s hiding, you should set the view’s new frame to that frame you saved in an instance variable, instead of setting it based on the keyboard’s end frame.

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

Sidebar

Related Questions

I have a directory full of images that I would like to resize to
How should I resize an image with Python script so that it would automatically
UITableView has custom header UIView , which contains UILabel. Since table has also section
i would like to resize a BufferedImage that is draw using the Graphics drawing
I would like to resize (downscale) some images the way that Facebook does it.
I have an application which has a tabcontrol that contains two tabpages. I have
How would I resize a image in jQuery to a consistent aspect ratio. For
I would like to resize a Java BufferedImage, making it smaller vertically but without
What would be the best way to resize images, which could be of any
Why would one use realloc() function to resize an dynamically allocated array rather than

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.