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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T20:26:57+00:00 2026-05-16T20:26:57+00:00

I have a somewhat complex iOS view hierarchy. One piece of text is an

  • 0

I have a somewhat complex iOS view hierarchy. One piece of text is an editable UITextField. When the user touches it, it becomes first responder, and is editable.

Here’s the rub, though: Best practice should be that a touch anywhere outside the edit control causes it to resign first responder and end editing. What’s the best way of accomplishing this?

Techniques I’ve tried:

  1. Use the exclusiveTouch property, which stops the user from interacting with other controls, but doesn’t cause editing to end. Also disallows user from interacting with my toolbar “Done” button.
  2. Put a see-through UIView under the text field control and on top of everything else (except the toolbar), and use touches there to end editing. This works, but I end up reparenting the text field onto this other random view which sits above my whole hierarchy, which means I have to take care of the text field’s layout in multiple places, since it no longer lives in the place where it lived originally, and I have to delegate all its behavior back and forth from its “shield” view to its native home container, which has all the related logic.

Is there an elegant solution to this problem that I’m missing? I figure it must be a common design issue.

Thanks.

  • 1 1 Answer
  • 2 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-16T20:26:58+00:00Added an answer on May 16, 2026 at 8:26 pm

    Tile 4 “see-thru” views around the textview to capture/ignore touches. Doesn’t require modifying or “lifting” the textview, and can be added to the parent view in a fairly modular way.

    You can’t mask a region without knowing what that mask will cover and what the mask will not cover. So any solution will require enough reach to gather both of those bounds. Either pass the text rect up, or the view rect/region to be disabled down, or both to something in-between. The controller for the stuff to be covered seems as good a place as any to consolidate both rects or regions, if not the controller for the text view.

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

Sidebar

Related Questions

I have a somewhat complex custom user control, created in C# .NET, which is
I have following somewhat complex sql query which has horrible performance, 'certainly' due to
This is somewhat complex (well to me at least). Here is what I have
I am writing a somewhat complex game engine in Android. Currently I have a
I have an ObservableCollection of ChildViewModels with somewhat complex behaviour. When I go to
I have a PHP web app that generates a somewhat complex report from our
I have a somewhat complex query with multiple (nested) sub-queries, which I want to
I have a somewhat complex pricing mechanism in my application- Here are some of
I'm creating a game in which I have a somewhat complex method for creating
I have several UIViews that have somewhat complex shapes that I have drawn via

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.