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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T04:54:03+00:00 2026-05-24T04:54:03+00:00

How do I limit touches to a specific region or UIView ? In other

  • 0

How do I limit touches to a specific region or UIView?

In other words, I have a UIButton on the view but it seems to be disabled by the touches.

I should also write that the touches do what I want, but, like I said, I lost control of the UIButtons.

@Implementation
...


- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {
    ...
}


- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event {
    ...
}


- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event {
    ...  
}

I solved my problem…

(My error) I made a smaller UIView with the UIButtons positioned outside of it. The subview was attached to that UIView. (I could see the buttons, but I couldn’t even press them)

Solutions(2 of them worked):

  • addSubview of UIButtons to self.view
  • or… enlarge the smaller UIView to 340 x 480.
  • 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-24T04:54:04+00:00Added an answer on May 24, 2026 at 4:54 am

    If your view (where you defined touchesBegan et al.) does not forward the touches to the next responder in the responder chain (among which there are your buttons), you could try to call [super] in all of those methods, i.e.:

    - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {
        ...
        [super touchesBegan:touches withEvent:event];
    }
    

    and the same for the other methods. See also the discussion here.

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

Sidebar

Related Questions

I have a bunch of UIView on my main view. I have added the
Documentation says that waypoints limit is 8 points. But I have to calculate a
How do I limit the short messages to 300 words and display the word
I want to limit the size of a list in python 2.7 I have
I know I can limit a user to a particular profile, but as a
Can I use LIMIT function in SQL line where it's not SELECT statement, but
I hear limit your global variables i javascript. If I have to declare variables
I am trying to limit the swipe area of the UIScrollview, but i amnot
I want to limit my users to a directory and its sub directories but
What limit should be placed on the number of rows to delete in 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.