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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T21:08:32+00:00 2026-06-04T21:08:32+00:00

This is one of those it was working a while ago troubleshooting efforts. I’m

  • 0

This is one of those “it was working a while ago” troubleshooting efforts.

I’m working on the document preview view controller, in which is a scroll view, which itself contains subclasses of UIView that represent each document. I’m modeling this pretty closely to how Keynote handles its document preview, except I build my scroll view horizontally and with paging. But the standard user experience is present: Long press on a document icon causes all document icons to start jiggling, nab bar has + button and Edit button, etc.

The issue at hand is that when you tap on the name of a document, I hide all the others, move the one being edited front and center, build a new text edit field, add it as a subview atop the real name label, and set it as first responder; but the

     [editNameTextField setClearButtonMode:UITextFieldViewModeWhileEditing];

while correctly showing in the edit field is not taking any action when the user taps on the clear button.

I can’t figure out what I may have done to cause this to not work — it had been!

My first thought was that somehow my instance of this subclass is no longer the delegate for this text edit field. To try and confirm/deny that, I usurped a tap on the image view of the document preview to compare the delegate property to self, and it passes.

if (editNameTextField) {
    NSLog(@"editNameTextField is still active");
    if ([editNameTextField.delegate isEqual:self]) {
        NSLog(@"we're still the delegate for the editNameTextField");
    }
}

Editing the text within the edit field works fine. Pressing the Return/Done key correctly sends the delegate message textFieldShouldReturn:

While investigating this I implemented the delegate method textFieldShouldClear: just to write a log message if the method gets called (and return YES of course). It never gets called.

My next thought was that perhaps a subview had covered up the area where the clear button sits. So I implemented textFieldShouldBeginEditing: and used the opportunity to bring my the text field to the front. That didn’t change anything either. I set a debugger breakpoint there to play a sound when it was called, and it got called, so I know my text edit field is frontmost.

I have only one troubleshooting strategy remaining: Go backwards through snap shots until it starts working again. Before doing that I thought I’d see if any of the more experienced folks out here have any suggestions of what to try next.

  • 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-04T21:08:33+00:00Added an answer on June 4, 2026 at 9:08 pm

    Where are you adding the textfield? As a subview of the scrollView? If you added the textfield and it is out of bounds of its parent view it won’t receive any touches.

    You can try and not call becomeFirstResponder and see if clicking it will show keyboard. Another possible error might be that the parent view of the UITextField has userInteractionEnabled = NO.

    Without seeing more code I’m afraid I can not offer more solutions.

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

Sidebar

Related Questions

This is one of those FRUSTRATING bugs in that it works and then it
This is one of those I probably should know this, but I don't questions.
This is one of those things that you read once, say aha! and then
Hey, so this is one of those questions that seems obvious, and I'm probably
This is just one of those little things I did all the time in
This is yet one more of those how to switch from running with a
Hey this is going to be one of those dumb questions. I am trying
I think this is going to be one of those simple-when-you-see-it problems, but it
I have a feeling this is going to be one of those bone-headed questions.
Good-morning one and all! This is going to end up being one of those

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.