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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T13:59:18+00:00 2026-06-07T13:59:18+00:00

To specify cell heights of a table view we use the delegate method, –

  • 0

To specify cell heights of a table view we use the delegate method,

- (CGFloat) tableView:(UITableView*)tableView heightForHeaderInSection:(NSInteger)section

However this method asks cell height of every row, what can I do if I want some of them to be defaults?

For cell height we may return UITableView#rowHeight for those default rows inside the delegate method, but I also want some (not all) of the section headers/cell to be customized.

But I am not able to get the defaults from the table view, especially for grouped style table view, anyone has a solution?

Thanks!

EDIT: I’m sorry for not making it very clear. In fact, cell height is not the only one that I want to partially customize, but also something else like section header (there may be more, like delete button style, etc.).

Is there solution without mimicking default behavior?

  • 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-07T13:59:20+00:00Added an answer on June 7, 2026 at 1:59 pm

    if you don’t want default behavior in all cases, you’ll still have to mimic default behavior in the non-specialized cases.

    for headers, you will still have to implement

    - (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section;
    

    and therein, you will have to answer the default height for those headers you do not wish to change, and the specialized header height for those you do want to change.

    similarly, in

    - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath*);
    

    you will still have to mimic default behavior for those cells you do not wish to change.

    you could accomplish all of this with storyboard if you want: create specialized cells with unique identifiers for each, and then return the cell heights that go with them. if you take this route, then you may be able to get away with just using dequeueReuaableCellWithIdentifier and using the height value for that identifier. just use a unique cell identifier with a height that’s appropriate for each cell you’re thinking of.

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

Sidebar

Related Questions

I have a UITableView with a Left Detail styled cell. The table view is
I'd like to be able to specify the offset or more specifically the cell
How can I specify that a method should take as parameter a pointer to
When I specify a template for a View in my Module, the URL that
I'm trying to create an HTML/CSS-based week calendar using CSS display:table-cell styling on the
is there a way to specify different cell editor for each cell in jface
I have a UITableView and each cell contains a Map button. When I tap
I have a progress bar in a html table cell. It seems to expand
I created a custom cell editor that extends BaseCellEditor but how do I specify
I have a couple of rows in a table view which I like to

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.