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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T02:47:24+00:00 2026-05-27T02:47:24+00:00

i am having dynamically created UITableView . I want to add 3 dummy row

  • 0

i am having dynamically created UITableView. I want to add 3 dummy row when the table view have ben populated from array.

My scenario is that when there is sufficient data in the UITableView, then at the bottom of uitable dummy rows with blank text.

In this way even if there is 40 records, by scrolling up the last two rows will be visible.
suppose my array count is 14 (which is dynamic/not always 14) then how do i add three blank row in index path 14,15,16 and setting their text as:

cell.textlabel.text=@"";
  • 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-27T02:47:25+00:00Added an answer on May 27, 2026 at 2:47 am

    You can do like this.

    retune no of row like this below.

    - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { 
    return [array count]+2; 
    }
    

    After that manage this in cellRowAtindexPath method like shown in below:

    - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
    
    static NSString *CellIdentifier = @"Cell";
    
    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
    cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];
    
    [cell setSelectionStyle:UITableViewCellSelectionStyleNone];
    [tableView setPagingEnabled:NO];
    //[tableView setSeparatorColor:[UIColor colorWithPatternImage:[UIImage imageNamed:@"longDotedLine.png"]]];
    
      if (indexPath.row < [array count]) {
          cell.textLabel.text = @"Test Data";
      } else {
          cell.textLabel.text = @"";
      }
    
    
    return cell;
    
    }
    

    Try this may be this help you.

    Thanks,
    MinuMaster.

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

Sidebar

Related Questions

I have a form that has an array of dynamically created labels of varying
I have a custom server control (composite control having dynamically created dropdown boxes and
please someone help out from this headaround problem of me; I have dynamically created
im having a problem with dynamic forms. I have dynamically created forms on button
I'm having a problem with some jquery animations. I have dynamically created divs with
So I've an array-variable of servers that is dynamically created from an external script.
I'm having a table in which i'm creating a label dynamically. '<td>' + '<label
i am having a application where i am generating the uibuttons dynamically want to
I am having a JSP page, where i am dynamically creating a Table data.
I'm having issues trying to append dynamically created html inside a SimpleModal box (OSX

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.