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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T09:04:12+00:00 2026-05-29T09:04:12+00:00

Problem I have a xib file with a UIImageView over the top of the

  • 0

Problem

I have a xib file with a UIImageView over the top of the background. I have it setup to resign when the user touches the background, but i cant figure out how to get the keyboard to resign if the user touches the UIImageView.

Question

What could I use to have the keyboard resign if they touch either the UIImageView OR the background?

Setup

There is an event set to listen for touch down on background that calls this method

- (IBAction)backgroundTap:(id)sender{
[userPassword resignFirstResponder];
[userLogin resignFirstResponder];    
}

that works beautifully, but i’m not sure how to link up the UIImageView.

  • 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-29T09:04:13+00:00Added an answer on May 29, 2026 at 9:04 am

    Make sure user interaction is disabled for the UIImageView. Then touches on that element should be passed along to the underlying view. This effectively ignores taps on the image view entirely.

    Alternatively, if you want to capture taps on the image view for some other reason you could create a UITapGestureRecognizer for the UIImageView whose action is your backgroundTap method or some other method. (You might have to create a different method with an appropriate signature for use with the gesture recognizer, but your method above may be just fine.)

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

Sidebar

Related Questions

I am having problem with ViewDidLoad Method.I have one .Xib File in my app
I have a problem where the button's I have added to .xib file are
I have a problem with this project, It hasn't a xib file or storyboard.
Problem: I have a table that prints out vertical but I would like it
did anyone encounter this problem? here's the code in ViewController.m. I have a UIImageView
I have a xib-file with a small UIView on it, which in turn contains
I have a UIView in an .xib file connected to it's relevant .h file
Greetings, Problem: I have a main view, that already is associated with a xib
i have some icons placed at a particular position in the .xib file and
I have a .xib file for my viewController. It contains a TableView and a

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.