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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T03:38:24+00:00 2026-06-10T03:38:24+00:00

I have an atypical iOS interface. Perhaps it’s not practical but I’m giving it

  • 0

I have an atypical iOS interface. Perhaps it’s not practical but I’m giving it a go. Hope someone can help!

I have a menu in the form of a UIVIew. It contains 5 small UIImageViews. A UIPinchGestureRecognizer is attached to the UIVIew. When pinched inward, the 5 UIImageViews animate from off screen to form a circle in the middle of the window. When pinched outward, they animate back offscreen. Everything works great there.

I’d like to be able to, at any point in the application, pinch the screen to reveal the menu, select one of the ‘buttons’ (UIImageView), and load the associated subview.

The real problem is, if the current visible view is a UIScrollView or UITableView, my app is having trouble figuring out whether the menu or other subview should handle the touch event. If I really focus and make sure two finger touch the screen at the EXACT same time, the pinch will work and pull the menu inward. But otherwise, it attempts to scroll the current visible view.

I would like all events except the pinch gesture, (and a tap gesture when the menu is visible), to pass through the menu view to the rest of the subviews.

I understand I can override the hitTest:withEvent method to determine the correct view to handle the event, but I’m unclear at this point how exactly to use it. Neither the Apple docs nor any answers I’ve read on stack overflow have made this method clear to me.

Any help is much appreciated.

  • 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-10T03:38:24+00:00Added an answer on June 10, 2026 at 3:38 am

    As UITableView is a subclass of UIScrollView, it inherits all of UIScrollView’s properties including its gesture recognisers.

    UIScrollView declares a UIPinchGestureRecognizer and UIPanGestureRecognizer. I’m not sure of the implementation details but I imagine the UITableView disables the pinch gesture recogniser as you are not supposed to be able to zoom a tableview!

    In any case, you can attach your own UIPinchGestureRecognizer to the table view:

    UIPinchGestureRecognizer *yPGR = [[UIPinchGestureRecognizer alloc]
    initWithTarget:probablySelf action:yourMenuShowSelectorHere];
    
    UITableView *tv = ...
    // ...
    [tv addGestureRecognizer:yPGR];
    

    Then, you can make sure that the UITableView scoll does NOT scroll until your pinch has failed:

    [tv.panGestureRecognizer requireGestureRecognizerToFail:yPGR];
    

    This way, the UITableView will not scroll until it is sure that it has not detected a pinch.

    EDIT: UIScrollView only uses (or at least declares public access to) UIGestureRecognizers in iOS 5 and up.

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

Sidebar

Related Questions

I think we cannot have any bending transform in iOS, not even with 3D
I have a typical form_for for registering user. But in the end I would
I am trying to accomplish the atypical library learning a language application. I have
I have a document that a string that has a dynamic date but also
I have a typical SlidingDrawer in my app, but i don't know how to
I have recently become thread curious on iOS. Please point me in the direction
I have a regular expression that does not seem to work for me so
I have a Windows CE device that we are deploying, but we have complete
I am an iOS (native) developer and have been since the App Store came
I have a typical question, I'm not sure whether it is possible or not.

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.