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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T09:31:36+00:00 2026-06-10T09:31:36+00:00

I have a UITableView that has some cells and I add a UITextField to

  • 0

I have a UITableView that has some cells and I add a UITextField to each of the cells.

I set textField.clearButtonMode = UITextFieldViewModeWhileEditing.

When I am editing the textField, the clear button and the keyboard both come out. I type some words in the textField, then tap the clear button, the keyboard will be hidden but the text in the textField will not be cleared.

All of the others work well except the clear button.

  • 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-10T09:31:38+00:00Added an answer on June 10, 2026 at 9:31 am

    I had this problem because I had forgotten I was using a UITapGestureRecognizer to catch taps on the table to dismiss the keyboard and it was capturing the tap on the clear button, preventing it from functioning. Add cancelsTouchesInView=NO on the UITapGestureRecognizer to let the touches still take effect and check using CGRectContainsPoint on the tapper method to only end editing and resignFirstResponder only when the tap wasn’t on the current UITextField‘s frame rect. Note that this still isn’t totally perfect since tapping X on an autocorrect might be outside the text field’s frame rect, so maybe checking the cell’s contentView would be better.

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

Sidebar

Related Questions

I need some help. I have a UITableView that has cells that hold the
I have a UITableview that I'm displaying some tasks and each row has a
I have a typical UITableView app that has some cells with some labels.. How
In my app, I have a UITableView which has some custom cells and in
I have a UITableView that has various cells that pulls in larger sized jpeg
I have a UITableView with some cells in it that have people's names. When
I have a UIPageControl that has 24 pages. Each page features a UITableView. A
I have a UITableView that has five sections. Just as the title describes cellForRowAtIndexPath
Is it possible to have a UITableView that has a fixed height for all
I have a custom UITableView cell that has a UIImageView sized to the width

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.