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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T06:03:03+00:00 2026-06-14T06:03:03+00:00

I have TextField in Custom Cell of UITableview .my Tableview is lower part of

  • 0

I have TextField in Custom Cell of UITableview .my Tableview is lower part of MainView so When i Click on TextField in CustomCell keyboard appear Which HIde my textfield.My below image show my problem

enter image description here

Here i have a Code which works when i have UITextField in MainView.please edit the Below Code Beacuse i want whole view Animation when i click on UITextfield.

-(void)textFieldDidBeginEditing:(UITextField *)textField {

if (textField.tag > 0) {
    [UIView beginAnimations:nil context:NULL];
    [UIView setAnimationDelegate:self];
    [UIView setAnimationDuration:0.5];
    [UIView setAnimationBeginsFromCurrentState:YES];
    self.view.frame = CGRectMake(self.view.frame.origin.x, self.view.frame.origin.y-165.0,
                                 self.view.frame.size.width, self.view.frame.size.height);
    [UIView commitAnimations];
}   

   }
 -(void)textresign{

[[self.view viewWithTag:1]resignFirstResponder];
   }
-(void)textFieldDidEndEditing:(UITextField *)textField {         
if (textField.tag > 0) {
    [UIView beginAnimations:nil context:NULL];
    [UIView setAnimationDelegate:self];
    [UIView setAnimationDuration:0.5];
    [UIView setAnimationBeginsFromCurrentState:YES];
    self.view .frame = CGRectMake(self.view.frame.origin.x, self.view.frame.origin.y+165.0,
                                  self.view.frame.size.width, self.view.frame.size.height);
    [UIView commitAnimations];
}   

  }

But i did’t know how to Fix it for my Custom cell UITextField.Any help will be appriated.

  • 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-14T06:03:04+00:00Added an answer on June 14, 2026 at 6:03 am

    here is the code ,just need to change code little bit

    -(void)textFieldDidBeginEditing:(UITextField *)textField
    {
    
        if (textField.tag > 0)
        {
            [UIView beginAnimations:nil context:NULL];
            [UIView setAnimationDelegate:self];
            [UIView setAnimationDuration:0.5];
            [UIView setAnimationBeginsFromCurrentState:YES];
            self.view.frame = CGRectMake(self.view.frame.origin.x, self.view.frame.origin.y-165.0,
                                         self.view.frame.size.width, self.view.frame.size.height);
            [UIView commitAnimations];
        }
    }
    

    use below method for repositioning the view on keyboard resigning instead of textFieldDidEndEditing.

    - (BOOL)textFieldShouldReturn:(UITextField *)textField
    {
    
        if (textField.tag > 0)
        {
            [UIView beginAnimations:nil context:NULL];
            [UIView setAnimationDelegate:self];
            [UIView setAnimationDuration:0.5];
            [UIView setAnimationBeginsFromCurrentState:YES];
            self.view .frame = CGRectMake(self.view.frame.origin.x, self.view.frame.origin.y+165.0,
                                          self.view.frame.size.width, self.view.frame.size.height);
            [UIView commitAnimations];
    
        }
        [textField resignFirstResponder];
        return YES;
    }
    

    using below method it mandatory to set the delegate to the textfield.

    i hope you could get the solution.

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

Sidebar

Related Questions

I have a UITextField in a custom tableview cell. On tapping the textfield area
I have a UITableView with custom cells in it. This custom cell looks like
In my app, I have a UITableView which has some custom cells and in
I have a tableView in which I use an instance of a custom TableViewCell.
I have a UITableView which is made up of my own custom UITableViewCell s,
I have a tableview cell with a custom textview in it, I am now
I am implementing a tab;e in which i have created a custom cell for
I have a custom cell with a uitextfield inside. I want to hide the
I have a UITableView with CustomCells which contain a TextField. Look at the pictures
I have a custom cell with a textfield as a subview. Is it legal

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.