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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T08:34:43+00:00 2026-06-16T08:34:43+00:00

Sorry about the vague question but I don’t know how to make it more

  • 0

Sorry about the vague question but I don’t know how to make it more specific because I don’t know what is wrong with the code. You guys probably can tell right away what those errors mean.

I’m trying to get overlay image to show up when the app is started and then to make the overlay go away with a tap gesture. I just can’t get this to work. I got the code from a different SO question (link: Create click-through overlay instruction view). Any ideas what I’m missing here? My code shows the error messages that I receive (2 errors, 1 warning).

AppDelegate.m

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
    UIImageView *overlay = [[UIImageView alloc]
                            initWithImage:[UIImage imageNamed:@"overlayImg.png"]];
    [self.window addSubview:overlay];

    UITapGestureRecognizer * recognizer = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(handleTap:)];
    recognizer.delegate = self; //WARNING: Assigning to 'id<UIGestureRecognizerDelegate>'from incompatible type 'AppDelegate *const__strong'
    [overlay addGestureRecognizer:recognizer];
    overlay.userInteractionEnabled =  YES;
    self.overlay = overlay; //ERROR: Property 'overlay' not found on object of type 'AppDelegate *'
    // Override point for customization after application launch.
    return YES;
}

- (void) handleTap:(UITapGestureRecognizer *)recognizer
{
    [self.overlay removeFromSuperView]; //ERROR: Property 'overlay' not found on object of type 'AppDelegate *'
}
  • 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-16T08:34:44+00:00Added an answer on June 16, 2026 at 8:34 am

    You can ether remove the line

    recognizer.delegate = self;
    

    or implement the delegate. Add this at the top of AppDelegate.m to get rid of the warning.

    @interface AppDelegate () <UIGestureRecognizerDelegate>
    
    @end
    

    And it looks like, that you are missing the UIImageView property.
    Go and add the property to the interface extension above. This should look like so:

    @interface AppDelegate () <UIGestureRecognizerDelegate>
    @property (nonatomic, strong) UIImageView *overlay;
    @end
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Sorry about the vague title, but i didnt know how to ask the question
Sorry about the wording of the question, I don't really know how to put
Sorry about the vague question title, but I have these typedefs here: typedef std::list<AnimationKeyframe>
Sorry for a vague title but it's hard to be more specific. Platform used:
Sorry about the extremely vague question title (any suggestions for improvements welcome) I have
Sorry about a vague title, but here's what i am trying to do. I
Sorry, this is a bad question. I don't even know what the title should
I'm sorry, I know this is a very simple question but I've search here
Im sorry if this is a newbie question but I'm getting confuse about how
First, sorry for the vague question title. I couldn't come up with a more

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.