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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T07:49:40+00:00 2026-06-18T07:49:40+00:00

For my needs I have a UITableView directly added under a UISCrollView : —

  • 0

For my needs I have a UITableView directly added under a UISCrollView :

— Main UIView

——– UITableView

——– UIScrollView

So when I scroll my scrollview I change the content offset of my tableview. It works perfectly.
But when I tried to select a cell I can’t catch delegate method :

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath 

Is there something special to do ? I tried to subclass UIScrollView and implement :

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

It works but I can’t scroll my UIScrollView …

  • 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-18T07:49:41+00:00Added an answer on June 18, 2026 at 7:49 am

    Try this,

    -(void)handleSingleTap:(UILongPressGestureRecognizer *)gestureRecognizer{
        CGPoint p = [gestureRecognizer locationInView:myScroll];
        NSIndexPath *indexPath = [myTable indexPathForRowAtPoint:p];
        [myTable selectRowAtIndexPath:indexPath animated:NO scrollPosition:UITableViewScrollPositionNone];
        [self tableView:myTable didSelectRowAtIndexPath:indexPath];
    }
    

    you have to use UITapGestureRecognizer…

    UITapGestureRecognizer *tpgr = [[UITapGestureRecognizer alloc]
                                    initWithTarget:self action:@selector(handleSingleTap:)];
    tpgr.numberOfTapsRequired = 1;
    [myScroll addGestureRecognizer:tpgr];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have a UITableView where i want one cell(database row) needs to be default,
So I have a UITableViewCell subclass that needs to know whether the UITableView is
I have a standard UITableView with standard cells (meaning no modification). Each cell needs
I have image that needs to be scrolled in uiscrollview but scrolling needs to
Currently I have UITableView and simple UIView in my iPad application. Each of them
I have a -(void) method in my main UITableView class, which I use to
I have a UITableView where a cell needs to be filled in with a
I have a UITableView that needs to have something inserted at the top in
I have a UITableView with heavy images content. So the scrolling is not fluid
I have a UITableView with cells of different heights and I need to know

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.