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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T23:40:50+00:00 2026-05-12T23:40:50+00:00

I submitted my app a little over a week ago and got the dreaded

  • 0

I submitted my app a little over a week ago and got the dreaded rejection email today. It tells me that my app cannot be accepted because I’m using a non-public API; specifically, it says,

The non-public API that is included in your application is firstResponder.

Now, the offending API call is actually a solution I found here on SO:

UIWindow *keyWindow = [[UIApplication sharedApplication] keyWindow];
UIView   *firstResponder = [keyWindow performSelector:@selector(firstResponder)];

How do I get the current first responder on the screen? I’m looking for a way that won’t get my app rejected.

  • 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-12T23:40:50+00:00Added an answer on May 12, 2026 at 11:40 pm

    In one of my applications I often want the first responder to resign if the user taps on the background. For this purpose I wrote a category on UIView, which I call on the UIWindow.

    The following is based on that and should return the first responder.

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

    iOS 7+

    - (id)findFirstResponder
    {
        if (self.isFirstResponder) {
            return self;
        }
        for (UIView *subView in self.view.subviews) {
            if ([subView isFirstResponder]) {
                return subView;
            }
        }
        return nil;
    }
    

    Swift:

    extension UIView {
        var firstResponder: UIView? {
            guard !isFirstResponder else { return self }
    
            for subview in subviews {
                if let firstResponder = subview.firstResponder {
                    return firstResponder
                }
            }
    
            return nil
        }
    }
    

    Usage example in Swift:

    if let firstResponder = view.window?.firstResponder {
        // do something with `firstResponder`
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

When I submitted my app for review I got and email saying in processing,
Last week we submitted our app to apple. Yesterday we got response from them.
I have a iPhone app I submitted a week ago and all was fine
I've submitted an app to the store that has been localised into a number
I submitted my app to the iTunes App Store for approval a little while
I have a little php/mysql app I put together that takes an input form
I recently submitted an app to iTunes that has in-app purchases. At what specific
More than one year ago I submitted an app. Now I want to update
I am building an iPhone app that will be submitted to the App Store.
I have successfully submitted and got approved my app in the app store. Now

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.