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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T14:51:53+00:00 2026-05-20T14:51:53+00:00

I have a custom popup menu in my iOS application. It is UIView with

  • 0

I have a custom popup menu in my iOS application. It is UIView with buttons on it. How do I handle event when user touch up outside this view? I want to hide menu at this moment.

  • 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-20T14:51:54+00:00Added an answer on May 20, 2026 at 2:51 pm

    You should create a custom UIButton that takes up the whole screen. Then add your subview on top of that button. Then when the user taps outside of the subview they will be tapping the button.

    For example, make the button like this:

    UIButton * button = [UIButton buttonWithType:UIButtonTypeCustom];
    [button addTarget:self action:@selector(yourhidemethod:) forControlEvents:UIControlEventTouchUpInside];
    [button setTitle:@"" forState:UIControlStateNormal];
    button.frame = self.view.frame;
    [self.view addSubview:button];
    

    (where yourhidemethod: is the name of the method that removes your subview.) Then add your subview on top of it.


    Update: It looks like you’re wanting to know how to detect where touches are in a view. Here’s what you do:

    -(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event 
    {   
      UITouch *touch = [touches anyObject];
      CGPoint touchPoint = [touch locationInView:self]; //location is relative to the current view
      // do something with the touched point 
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

so I have created this popup window with a custom move and sizing, pressing
I have an activity with custom popup window (quickaction style). There are some buttons
Coming from this question , I have a wxComboCtrl with a custom popup made
I have a simple android application which does search. I have a custom popup
I have a popup menu that displays dynamically created custom JPanel objects in a
I have created a custom popup to decorate my buttons with animated tooltips. I
I am new to java-script and have made this script to popup this custom
I have a WPF application where I'd like to create a custom pop-up that
i have custom cell with 2 buttons(the function of these buttons is just to
I have custom event that has several different subscribers who will all use the

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.