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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T15:06:43+00:00 2026-05-25T15:06:43+00:00

Edit: It works fine, But still when the table get Loads Some gap remains

  • 0

Edit: It works fine, But still when the table get Loads Some gap remains between table top and table header abt 30 pxcls(or 1 row) ..?

Please help….

I am scrolling it works fine. All the table rows are scrolling and table header is fixed.
But when I scroll to end of the table it looses its property of fix. I mean is boundry scrolling. I want to freeze it absolutely. At the boundary condition it looses the top position of the table and slides about 20 pxcls.

//Header Format starting
- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section
{
    return 20.0;
}

- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section     
{
    if (tableView.tableHeaderView) { // header was already created... go away
        return tableView.tableHeaderView;
    }

    CGFloat width = 300.0f;
    CGRect rectArea = CGRectMake(10.0f, 5.0f, width, 25.0);

    tableView.tableHeaderView = [[[UIView alloc] initWithFrame:rectArea] autorelease];

    //UIColor *orange =  [UIColor colorWithRed:(255.0f/255.0f) green:(228.0f/255.0f) blue:0.0f alpha:1.0f];

    [tableView.tableHeaderView setBackgroundColor:[UIColor grayColor]];

    rectArea = CGRectMake(02.0f, 1.0f, width, 20.0);
    UILabel *lbl = [[UILabel alloc] initWithFrame:rectArea];
    lbl.text = NSLocalizedString(@"Bill Total", @"");
    lbl.textAlignment = UITextAlignmentLeft;
    //lbl.font = [UIFont systemFontOfSize:13.0f];
    lbl.font = [UIFont fontWithName:@"Courier New" size:14];
    lbl.font=[UIFont italicSystemFontOfSize:14];
    lbl.textColor = [UIColor blackColor];
    lbl.backgroundColor = [UIColor clearColor];
    lbl.numberOfLines = 2.0f;
    lbl.lineBreakMode = UILineBreakModeWordWrap;
    //[lbl sizeToFit];

    [tableView.tableHeaderView addSubview:lbl];
    [lbl release];

    // self.table.tableHeaderView.layer.cornerRadius = 6.0f;

    return table.tableHeaderView;
}
  • 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-25T15:06:44+00:00Added an answer on May 25, 2026 at 3:06 pm

    If I understand your question correctly, it sounds like you just need the table not to bounce. If that’s the case, all you need to do is set yourTable.bounces = NO; in your viewDidLoad function. Either that or uncheck the “Bounces” option in the NIB if you used one to layout your table.

    Here’s how to fix the problem you mentioned in your edit… You need to replace the following references to tableView.headerView with references to a new view that’s not being passed into the delegate method.

        UIView *headerView = [[[UIView alloc] initWithFrame:rectArea] autorelease];
        //...    
        [headerView setBackgroundColor:[UIColor grayColor]];
        //...
        [headerView addSubview:lbl];
        //...
        return headerView;
    

    I tried it and it did the trick for me. Hope that helps.

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

Sidebar

Related Questions

I can't seem to get my edit class to work. My validation works fine
The following works fine in iOS 4.3 but throws a EXC_BAD_ACCESS in iOS5. if(mainTable
This works: Entities.WorkOrderSet.Where(MyCustomMethod); This does not: Entities.WorkOrderSet.Where(o => MyCustomMethod(o)); ( [Edit] Even without new
I use edit-in-place plugin: http://arashkarimzadeh.com/jquery/7-editable-jquery-plugin.html I't works Great! I just need something to check
I have a database that I built in SQLite browser, and it works fine.
I've said this about a million times already, but I'm still new to ASP.Net
Okay, I have a database, but no tables in it. I have some entity
I'm trying to run some JUnit test units in Eclipse 3.5, but with no
**EDIT: There are several options below that would work. Please vote/comment according to your
EDIT: Scotty2012 and David Morton's answers don't work for me so I have put

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.