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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T04:03:46+00:00 2026-05-26T04:03:46+00:00

I have add a view with button in UITableView Header . I have set

  • 0

I have add a view with button in UITableView Header . I have set the height properly, and the button is actually functional when keyboard is not shown. When some textfield was pressed (UITextField in Cell) keyboard will shown, and I have set the table view frame to smaller, so the cell can be clicked, but the problem is the button — when the button is intersect some of it in tableview (when button is not fully shown), the button is not functional and it is functional when the button is fully shown.

I have tried it by placing the button in scroll view instead of placing in the footer or tableview header, it works perfectly. Is this some kind of UITableView header bug? Can it be fixed?

  • 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-26T04:03:47+00:00Added an answer on May 26, 2026 at 4:03 am

    Add following in your code :

    -(BOOL)textFieldShouldEndEditing:(UITextField *)textField
    {
    
          if(textField.tag != [[[yourTable indexPathsForVisibleRows] objectAtIndex:0]row])
              [self animateTextField: textField up: NO];
        return YES;
    }
    
    - (void)textFieldDidBeginEditing:(UITextField *)textField
    {
    
        if(textField.tag != [[[yourTable indexPathsForVisibleRows] objectAtIndex:0]row])
        [self animateTextField: textField up: YES];
    }
    
    - (void) animateTextField: (UITextField*) textField up: (BOOL) up
    {
        const int movementDistance = 300; // tweak as needed
        const float movementDuration = 0.3f; // tweak as needed
    
        int movement = (up ? -movementDistance : movementDistance);
    
        [UIView beginAnimations: @"anim" context: nil];
        [UIView setAnimationBeginsFromCurrentState: YES];
        [UIView setAnimationDuration: movementDuration];
        self.view.frame = CGRectOffset(self.view.frame, 0, movement);
        [UIView commitAnimations];
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Here's my case: I have a table view showing contacts. Add button in the
I have a view that I want to add some custom drawing to. I
I have 2 view controller pages.Add Reminder page which contains save button as right
Can you add a button as a subview to a uitableview cell and have
I have a for loop that creates multiple UIImageViews that I add to self.view
I have a form in witch users can add their working hours view them
I have to add some enum options to a database table. The problem being,
I created sample tableview application and I have an add button above the tableview,
I have a UITableView and i programatically add two buttons to the cell. 1
I have a Add view which uploads file which is element of Question class

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.