Add empty (blank) space under (in the end of) UITableView

Related searches

My app has the UITableView which have variable quantity of cells inside. How can I add empty (blank) space with certain height under the UITableView? Or in the very end of UITableView? So that after the very last cell there will be more blank space.

Make content inset on your table view:

let insets = UIEdgeInsets(top: 0, left: 0, bottom: 100, right: 0)
self.tableView.contentInset = insets

That will leave some blank space under the table view after you scroll to the last cell.

UITableView extra space at bottom, Before I flipped the table view, the content inset was leaving a blank space at the top so that when we scrolled all the way up, the content was  The empty view will be displayed whenever the table view has no cells in any section. Of course only if a view has been set via nxEV_emptyView . Whenever the table view is reloaded or layouted the empty view gets updated.

You can use tableView Footer for that

UIView *view = [[UIView alloc] initWithFrame:CGRectMake(0, 0, self.tableView.frame.size.width, 100)];
[self.tableView setTableFooterView:view];

Blank area at bottom of UITableView, Hi all, I've set up a UITableView in a navigation-based iPhone app, and I've been surprised to see that there is a blank area within the rectangle of the Obviously if the height of the table is more than the height of its rows there will be empty space. Is that what you're seeing? Add-ons by ThemeHouse. 24 Add empty (blank) space under (in the end of) UITableView Aug 16 '16 21 UITextView text not starting from top Mar 12 '17 21 Is there any way to see the file system on the iOS simulator?

2019. It's honestly this simple:

add the following in viewDidLoad

tableView.contentInset.bottom = 100

Really that's all there is to it.

override func viewDidLoad() {
    super.viewDidLoad()
    tableView.contentInset.bottom = 100
}

Hiding empty table view rows, In that situation UIKit fills the space below the rows in the table with Swift tableView. A better approach is to add a footer view to the table. The already mentioned solutions are shorter than my solution. But if you need extra customization of your bottom blank-space and if you don't need the tableView-footerView for other things, you might as well use the footerView to create your extra bottom blank-space and do :

Thanks @Siklab.ph for me the best answer.

self.tableView.contentInset.bottom = 100

Extra Space When Embedding Table Views, You get some extra unwanted space between the bottom of the bar and the first views visible when they flowed under a transparent navigation bar. as UITableView the container view controller automatically adds an extra  Inserts a blank space that will stretch accordingly to fill the space available. The commands \hrulefill and \dotfill do the same as \hfill but instead of blank spaces they insert a horizontal ruler and a string of dots, respectively. Open an example in Overleaf. Vertical blank spaces. Vertical blank spaces have the same syntax as horizontal ones.

I honestly do not like to mess around with insets too much (especially if you are already modifying them for other reasons).

The solution I found was to override tableView(_:heightForFooterInSection:) method and return the desired space height for the last section of the tableView:

override func tableView(_ tableView: UITableView, heightForFooterInSection section: Int) -> CGFloat {
    if section == lastSectionIndex {
        return 30.0
    }
    return 0.001
}

The last 0.001 value is for all other sections which, in my case, they do not have any footer; in this way, the footer in other sections is missing. No extra view creation needed.

How to remove header and footer space from a UITableView?, Add this code: - (CGFloat)tableView:(UITableView *)tableView UIView can be inserted at the top and bottom of the table(drag and drop). Set their properties as​  Insert a column to the left of Column A. In the empty column enter “1” in the row with the 1st row of data. AutoFill the number down. At the bottom of the screen by the Column A, click on the AutoFill options box and select Fill Series. The series is selected from 1 to whatever the last row would be numbered.

a) Interface Builder Select the view controller Open Attributes inspector There's a property called "Adjust scroll view insets" in IB's attribute inspector (when a ViewController is selected) which is on by default.

Empty UITableView after changing to custom class Level 6 (2,485 points) junkpile May 6, 2016 12:02 AM ( in response to cpoetter )

50+ videos Play all Mix - Taylor performs "Blank Space" at The GRAMMY Museum YouTube Taylor Swift Private Concert - Love Story Live - Duration: 5:01. Curtis Allison 2,092,948 views

Comments
  • Add tbl_view.tableFooterView = [[UIView alloc] initWithFrame:CGRectZero]; in viewDidLoad
  • you sir are a Mustache 👨🏻
  • Or simply self.tableView.contentInset.bottom = 100
  • It is perfect answer.. Thanks
  • @Siklab.ph , you're the only person on this whole page who knows how to do this :)
  • This answer is really not right. You're changing the other insets, which is almost always not what you want to do.
  • To be clear this is the only correct answer on this page :/
  • yeah don't do this