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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T21:26:13+00:00 2026-05-30T21:26:13+00:00

In my app, I have a UITableView which has some custom cells and in

  • 0

In my app, I have a UITableView which has some custom cells and in those I have placed UITextField. That UITextField is sometimes getting blocked my the keyboard which is a issue. So in my situation I am trying to move the whole tableview itself instead of just scrolling to a particular cell which was an issue for me.

Anyway I am having issues this way too.

Anyway this is my code for the textField showing method and ending method. The problem is that the UITableView never moves the right amount. I am just trying to move the UITableview up enough so that the cell that the UITextField that is currently being invoked, is just above the keyboard. So sometimes it scrolls up too much where I can’t see the cell or the whole tableview moves a crazy amount where I do not see it at all.

Anyway here is my code, does anyone see anything wrong?

- (BOOL)textFieldShouldBeginEditing:(UITextField *)thetextField {
    CustomCell *cell = (CustomCell*)[[thetextField superview] superview];
    CGRect cellRect = [cell convertRect:cell.frame toView:self.view];
    float bottomCell = cellRect.origin.y - cellRect.size.height;
    if (bottomCell >= keyboardY) {
        subtractionAmount = keyboardY - bottomCell;
        didMove = YES;
        [UIView animateWithDuration:0.4 
                         animations:^{
                             thetableView.center = CGPointMake(thetableView.center.x, thetableView.center.y + subtractionAmount);
                         }];
    }
    return YES;
}

-(BOOL) textFieldShouldReturn:(UITextField *)thetextField {  
    if (didMove) {
        didMove = NO;
        [UIView animateWithDuration:0.4 
                         animations:^{
                             thetableView.center = CGPointMake(thetableView.center.x, thetableView.center.y - subtractionAmount);
                         }];
    }

Thanks!

  • 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-30T21:26:14+00:00Added an answer on May 30, 2026 at 9:26 pm

    If I undesrtood correctly your problem, I encountered that problem one month ago. My scenario was the following: a UITableView with UITextFields without a UITableViewController.

    I fixed the problem with the following tutorial: sliding-uitextfields-around-to-avoid.

    Hope it helps.

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

Sidebar

Related Questions

I have set up a UITableView-based app, which has a .plist for holding the
I have a uitableview 'A' which has cells, on clicking one of the cell,
In my app I have a UITableView that contains custom UITableViewCells. Scrolling is very
i have an UITableView in my app and i have to load some images
On my iphone app, I have a UITableView in edit mode, containing custom UITableViewCell.
I have a working UITableView filled with some options for my app, and i
In an app I'm working on, I have a plain style UITableView that can
Our app has a UITableViewController with some custom section headers. These section headers are
I'm working on a iPhone app which has a pretty large UITableView with data
I have a class called ListViewController which has a UITableView attached to it and

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.