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

  • Home
  • SEARCH
  • 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 4114574
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T22:28:21+00:00 2026-05-20T22:28:21+00:00

In my UITableView, I have a tableHeaderView that should resize itself according to the

  • 0

In my UITableView, I have a tableHeaderView that should resize itself according to the content. The resizing works fine, however, the tableHeaderView obscures the first couple of cells. Apparantly changing the frame of the tableHeaderView doesn’t reorganize the rest of the view.

I’ve already tried calling [self.tableView layoutSubViews] and [self.tableView setNeedsLayout], but those don’t help either. Also tried giving the tableHeaderView from the Interface Builder an outlet to change the frame on that, but that doesn’t reorganize the tableView either.

How can I change the size of the tableHeaderView, without hiding any cells, reorganizing the rest of the tableView?

  • 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-20T22:28:22+00:00Added an answer on May 20, 2026 at 10:28 pm

    I don’t know how you created you UITableView, but I tried to create one with a tableHeaderView like you and it’s resizing.

    I created a class inheriting from UITableViewController

    @interface MyTableViewController : UITableViewController {
    
    }
    
    @end
    

    and for the implementation, in the viewDidLoad, I added:

    UIView *header = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 320, 100)];
    [header setBackgroundColor:[UIColor redColor]];
    self.tableView.tableHeaderView = header;
    

    enter image description here

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

Sidebar

Related Questions

I have placed a UISearchBar in my UITableView.tableHeaderView. However it covers the searchBar by
I have UITableView with very large cells with lots of content (more than one
I have a UITableView that lists comments from various users. I save all of
I want to add a dynamic image in the UITableView's tableHeaderView part. For that
In my 'Sectioned' UITableView I have two sections, the first one for Attributes like
I have a UIViewController, and within that view i have UITableView added in IB
In my iOS5 application, I have UITableView that would display cells based on NSString
I have a UITableView that I build in loadView . One of the things
I have UITableView that contains many cell. User can expand cell to see more
I have UITableView with some content, which is loaded in asynchronous way. When user

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.