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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T09:17:34+00:00 2026-06-15T09:17:34+00:00

I have two views, one above another as a child. View1—>View2 (View1 has View2

  • 0

I have two views, one above another as a child.
View1—>View2 (View1 has View2 as a child)

How can I code this functionality?
1) if user TAPed on View2 – so the proper message tapped: sent to View2;
2) if user just moving finger over the View1(including View2) – events passed to View1 so it can handle touchesBegan: and so on.

So what I am trying to code is make one function “[View2 tapped:…]” if touch was short, and another function([View1 touchesBegan:..] and so on) if touch is moving.

In my case if I move finger over View2 – it never passes events to View1.

P.s. I did not rewrite hitTest or anything.

  • 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-15T09:17:34+00:00Added an answer on June 15, 2026 at 9:17 am

    Gesture recognizers handle this sort of logic quite elegantly. Have a UITapGestureRecognizer on view2, and do whatever you want on view1 (e.g. a UIPanGestureRecognizer). That takes care of all of the “what gestures are recognized by what views” logic you need.

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

Sidebar

Related Questions

I have two views within one .xib (one view for landscape, another for portrait).
I have two UIImageView objects inside my view (both 320x480 one above the other).
I have two views in my ViewFlipper . One of views contains a ListView
I have two views, one view takes the whole screen, the second view covers
I have two views that I would like to combine into one. The first
I have two table views, when user clicks one cell of the first, second
I have two text views to display the text one below other. The issue
I have two TableLayouts, one above the other, in my View. I want them
I have two partial view and I want to call one of them in
So I have two TableView in one view of an iOS app. I have

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.