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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T09:39:55+00:00 2026-05-25T09:39:55+00:00

I wanna make it like, touch the section header then jump to end of

  • 0

I wanna make it like, touch the section header then jump to end of this section. How could I do it? Any suggestions? Cheers

- (UIView *) tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section 
{
    UIView *headerView = [[[UIView alloc] initWithFrame:CGRectMake(0, 0, tableView.bounds.size.width, 30)] autorelease];
    [headerView setBackgroundColor:[[UIColor grayColor] colorWithAlphaComponent:0.7]];
    UILabel *titleInSection = [[[UILabel alloc] initWithFrame:CGRectMake(50, 3, tableView.bounds.size.width/3, 20)] autorelease];
    [titleInSection setBackgroundColor:[[UIColor grayColor] colorWithAlphaComponent:0]];
    [titleInSection setTextColor:[UIColor whiteColor]];
    if (isSectionLoad == YES){
        [categoryData retain];
        titleInSection.text = [categoryData objectAtIndex:section];
    }

    titleInSection.tag = section;
    UITapGestureRecognizer *recognizer = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(sectionTapped:)];
    [titleInSection addGestureRecognizer:recognizer];
    [recognizer release];

    [headerView addSubview:titleInSection];
    return headerView;
}

- (IBAction)sectionTapped:(UITapGestureRecognizer *)recognizer
{
    switch (recognizer.view.tag) {
        case 0:
            // do what you want for section with index 0
            NSLog(@"HELLO WORLD!!!");
            break;

        default:
            break;
    }
}
  • 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-25T09:39:55+00:00Added an answer on May 25, 2026 at 9:39 am

    Implement method - (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section in your delegate. In this method create UIView with needful subviews (labels, images and etc.). At the end just add UITapGestureRecognizer to that view. And then return it it.

    For example:

    - (IBAction)sectionTapped:(UITapGestureRecognizer *)recognizer
    {
        switch (recognizer.view.tag) {
            case 0:
                // do what you want for section with index 0
                break;
    
            default:
                break;
        }
    }
    
    - (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section
    {
        UILabel *label;
        label.text = [NSString stringWithFormat:@"Section %d", section];
        label.tag = section;
        UITapGestureRecognizer *recognizer = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(sectionTapped:)];
        [label addGestureRecognizer:recognizer];
        [recognizer release];
        return  label;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I wanna rewrite links like index.php?page=entry&id=15&action=edit to entry/15/edit . This is how my .htaccess
i wanna make an attribute of an element to be unique like primary key.
I wanna to write code like this require 'sinatra' class MyModel def edit(request) #
Hi I wanna make a website preferably using asp.net 3.5 in c#. In this
I wanna know is it possible to make an operating like windows-xp which is
I wanna make this rather simple to ask so I can hope for a
I wanna create some loading dots, like this: At 0000 miliseconds the span content
I wanna do something like this: <?php $editor = new editor('reply.php?topic=100', 'simple'); echo $editor;
I wanna make a login screen like the one from Facebook's app. The part
In codeigniter we use a method call like this $this->load->view(); I wanna know what's

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.