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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T06:32:24+00:00 2026-06-09T06:32:24+00:00

If I have a grouped UITableView, it comes with a grayish border/buffer around the

  • 0

If I have a grouped UITableView, it comes with a grayish border/buffer around the edge of it. Is there any way to tell how large this buffer is, or equivalently, how big the actual white cell inside it is?

  • 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-09T06:32:26+00:00Added an answer on June 9, 2026 at 6:32 am

    This is how you can eliminate the left and right margins of a grouped UITableView. Just subclass UITableViewCell. Note that if you want the margin to be something other than 0 just change the setFrame method to suit your needs.

    //In CustomGroupedCell.h
    #import <UIKit/UIKit.h>
    
    @interface CustomGroupedCell : UITableViewCell
    @property (nonatomic, weak) UITableView *myTableView;
    @end
    
    
    
    
    //In CustomGroupedCell.m
    #import "CustomGroupedCell.h"
    
    @implementation CustomGroupedCell
    @synthesize myTableView = _myTableView;
    
    - (void)setFrame:(CGRect)frame 
    {
        frame = CGRectMake(- [self cellsMargin] , frame.origin.y, self.myTableView.frame.size.width + 2 *[self cellsMargin], frame.size.height);
        self.contentView.frame = frame;
        [super setFrame:frame];
    }
    
    - (CGFloat)cellsMargin {
    
        // No margins for plain table views
        if (self.myTableView.style == UITableViewStylePlain) {
            return 0;
        }
    
        // iPhone always have 10 pixels margin
        if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone)
        {
            return 10;
        }
    
        CGFloat tableWidth = self.myTableView.frame.size.width;
    
        // Really small table
        if (tableWidth <= 20) {
            return tableWidth - 10;
        }
    
        // Average table size
        if (tableWidth < 400) {
            return 10;
        }
    
        // Big tables have complex margin's logic
        // Around 6% of table width,
        // 31 <= tableWidth * 0.06 <= 45
    
        CGFloat marginWidth  = tableWidth * 0.06;
        marginWidth = MAX(31, MIN(45, marginWidth));
        return marginWidth;
    }
    
    @end
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have some large images in a grouped UITableView. There's 1 row in each
I have a grouped UITableView with some large images. However, scrolling performance is quite
I have a grouped UITableView which displays a number of cells, which includes both
I have a grouped UITableView where not all sections may be displayed at once,
I have a grouped UITableView with many sections, however, I want to iterate through
I have 3 UITextFields in a grouped UITableView and am trying to figure out
I have a grouped UITableView that has 3 sections. I would like to show
I have a grouped UITableView that contains several cells (just standard UITableViewCell s), all
I have a grouped UITableView, with cells in section 2 depending on cells in
I have a grouped style UITableView. It have only one section & the section

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.