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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T15:03:38+00:00 2026-06-06T15:03:38+00:00

In my iOS app I have several UIElement s that can process user input:

  • 0

In my iOS app I have several UIElements that can process user input: textfields, editable webviews, etc. each time I write something into these UIElements the keyboard (obviously) will come up. Before it happens I can catch this event by observing the UIKeyboardWillShowNotification.

I would like to know what’s the way to find out which UIElement invoked this action.

Thanks for your help!

  • 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-06T15:03:40+00:00Added an answer on June 6, 2026 at 3:03 pm

    The keyboard is launched when the view tapped by a user is set as FirstResponder, so I think this question is the equivalent of saying how do I get the current first responder when UIKeyboardWillShowNotification is received?.

    The answer to that question by Thomas Muller was to use a class extension along the lines of:

    @implementation UIView (FindFirstResponder)
    - (UIView *)findFirstResponder
    {
        if (self.isFirstResponder) {        
            return self;     
        }
    
        for (UIView *subView in self.subviews) {
            UIView *firstResponder = [subView findFirstResponder];
    
            if (firstResponder != nil) {
                return firstResponder;
            }
        }
    
        return nil;
    }
    @end
    

    So I think you could use that inside your handler for UIKeyboardWillShow to figure out what caused it.

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

Sidebar

Related Questions

I have an app that uses several different user defaults that need to be
I have a Rails app that has 2 clients -- an iOS app reads/writes
Hi i have native ios app And i have old version that not compitible
How can I add a timer to my iOS app that is based on
I have an iPhone (iOS) app that keeps data in a local SQLite database
I'm testing my app with the iOS 5 beta and have run across several
I have an app that includes a tableView . The tableView has several sections,
I'm writing an app (in iOS 5 using ARC!) that presents several hundred objects
We have an app that has crashed on armv6 iOS devices coming from the
I have an iOS app on App Store that utilized Data Core with SQLite

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.