Your browser (Internet Explorer 6) is out of date. It has known security flaws and may not display all features of this and other websites. Learn how to update your browser.
X
Post

Removing pesky UITableView lines

You know how, if you have a UITableView with only a few entries, how the divider lines for the empty (non-existent) cells still show up? This happens to me every once in a while, and every time I always have to go look up the solution. Well in case you’re wondering, it’s as easy as one line of code:

mTableView.tableFooterView = [[[UIView alloc] initWithFrame:CGRectZero] autorelease];

And that’s it. Happy coding!

  • Thanks, thanks, thanks! This helped me a lot :)

    Ashik

    23Oct12

  • You’re welcome!

    henning

    02Nov12

Leave a comment  

name*

email*

website

Submit comment