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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T13:53:16+00:00 2026-05-15T13:53:16+00:00

In my table view I had more than 200 rows and Im managing then

  • 0

In my table view I had more than 200 rows and Im managing then by keeping loadmoreresults in last cell to display only 40 rows per page.when the user clicks on the load more results 40 more cells is displayed.I changed the row height of loadmoreresults cell as different from other. The problem is when there is no more results the height for other cell is effected with the height of the loadmoreresults cell I dont want to sffect the last row height to other rows.

The code I written as:

- (NSInteger)tableView:(UITableView *)tableView  numberOfRowsInSection:(NSInteger)section
{
ZohoAppDelegate* appDelegate = (ZohoAppDelegate*) [ [UIApplication sharedApplication] delegate];

int maxResults = [appDelegate.invoiceMaxValues intValue];
int noOfResults = [invoiceArray count] ;
if (noOfResults != 0 )
{   
    if (maxResults > noOfResults)
    {
        noOfResults++;
        rowCount = noOfResults;
    }
}
return noOfResults;
}

- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
{
if(indexPath.row == (rowCount -1))
{
    return 50;
}
return 80;
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
UITableViewCell *cell = (UITableViewCell *)[tableView dequeueReusableCellWithIdentifier:@"MyIdentifier"];
if (cell == nil) 
{
    cell = [[[UITableViewCell alloc] initWithFrame:CGRectZero reuseIdentifier:@"MasterViewIdentifier"] autorelease];
    cell.selectionStyle = UITableViewCellSelectionStyleNone;
    cell.accessoryType = UITableViewCellAccessoryNone;
    UIView* elementView =  [[UIView alloc] initWithFrame:CGRectMake(5,5,312,480)];
    elementView.tag = 0;
    [cell.contentView addSubview:elementView];
    [elementView release];
}
UIView* elementView  = [cell.contentView viewWithTag:0];
for(UIView* subView in elementView.subviews)
{
    [subView removeFromSuperview];
}

UIImageView* imaeView=[[UIImageView alloc] initWithFrame:CGRectMake(0, 0, 320, 78)];
if(indexPath.row == (rowCount-1))
{
    elementView.backgroundColor = [UIColor colorWithRed:0.92578125 green:0.92578125 blue:0.92578125 alpha:1];
}
else
{
    imaeView.image=[UIImage imageNamed:@"estimatecellbg.png" ];
}
[elementView addSubview:imaeView];
[imaeView release];
    return cell;
  }

Anyone’s help will be much appreciated.

Thank you,
Monish.

  • 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-15T13:53:17+00:00Added an answer on May 15, 2026 at 1:53 pm

    Something along the lines of

    - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
    {
        if(indexPath.row == (rowCount -1) && moreResults)
        {
            return 50;
        }
        return 80;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a table view with more than 1000 cells (I display about 10
If I had 1000 rows, would a single-line separator make the table view bigger
I've a table view with a custom image background of each cell. In normal
dequeueReusableCellWithIdentifier: Returns a reusable table-view cell object located by its identifier. (UITableViewCell *)dequeueReusableCellWithIdentifier:(NSString *)identifier
I have created a grouped table view & I had a edit button in
I have a Table View Controller with cells. I want to update the text
In the root table view controller I add a subview that holds an image:
I have a table view controller with custom cells. In those cells i added
I have a table view that I am customizing and I am adding a
I have a simple table view which is editable. All I need the 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.