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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T18:33:43+00:00 2026-06-17T18:33:43+00:00

I have a UITableView and I have only 3 rows in it, and I

  • 0

I have a UITableView and I have only 3 rows in it, and I can see those 3 rows. The problem is the cells that are empty: I can see lines there. I don’t want to see those lines.

Any idea how to remove those lines?

Below is image for what I am looking for.

Image Link

  • 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-17T18:33:44+00:00Added an answer on June 17, 2026 at 6:33 pm

    You can hide UITableView‘s standard separator line by using any one of the below snippets of code.
    The easiest way to add a custom separator is to add a simple UIView of 1px height:

    UIView* separatorLineView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 320, 1)];
    separatorLineView.backgroundColor = [UIColor clearColor]; // set color as you want.
    [cell.contentView addSubview:separatorLineView];
    

    OR

        self.tblView=[[UITableView alloc] initWithFrame:CGRectMake(0,0,320,370) style:UITableViewStylePlain];
        self.tblView.delegate=self;
        self.tblView.dataSource=self;
        [self.view addSubview:self.tblView];
    
        UIView *v = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 320, 10)];
        v.backgroundColor = [UIColor clearColor];
        [self.tblView setTableHeaderView:v];
        [self.tblView setTableFooterView:v];
        [v release];
    

    OR

    - (float)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section {
        // This will create a "invisible" footer
        return 0.01f;
    }
    
    - (UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section
    {
        // To "clear" the footer view
        return [[UIView new] autorelease];
    }
    

    OR

    And also check nickfalk’s answer, it is very short and helpful too.
    And you should also try this single line,

    self.tableView.tableFooterView = [[UIView alloc] init];
    

    Not sure but it’s working in all the version of iOS that I checked, with iOS 5 and later, up to iOS 7.

    • 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 rows that each have two actions that can be
I have a UITableView filled with rows of data. There are only 3 or
So I have a subclassed UITableView that lists data. I need to make only
I have UITableView with images as rows (cells). I use EGOImageView to load images
I have a UITableView which sometimes has only a few rows. I would like
I have an UITableView with sections and many rows. I don't need a detailed
I have a UITableView that uses prototype cells to recreate a table. I have
I have a UITableView with draggable rows and I can add/remove items. The datasource
I am trying to create a UITableView that only displays the number of rows
I have been working on a problem relating to UITableView and cellForRowAtIndexPath. I want

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.