Infamous911
Infamous911

Reputation: 1531

Xcode UITableView Placement and Cell Separators

I am having a problem where my UITableView is not extending all the way to the bottom of the page even though I have it set up so that I believe it should.

Table doesn't extend to bottom

Also, the cell separators do not seem to show up unless I scroll the table.

Cell separators show up only on scroll

Upvotes: 1

Views: 159

Answers (3)

Mahesh Agrawal
Mahesh Agrawal

Reputation: 3358

Try to set the property automaticallyAdjustsScrollViewInsets to NO like this.

self.automaticallyAdjustsScrollViewInsets = NO;

or

self.navigationController.automaticallyAdjustsScrollViewInsets = NO;

EDIT:

from your screenshots its seems to be constraint problem. Try setting constraints left, right, top, bottom and try again. You see the yellow line coming and a warning regarding the constraint problem. When it goes your table view will work fine.

Upvotes: 1

Black Sheep
Black Sheep

Reputation: 1675

For the separator issue try setting the separator style [[self tableView] setSeparatorStyle:UITableViewCellSeparatorStyleSingleLine]; or self.tableView.separatorStyle = UITableViewCellSeparatorStyle.SingleLine

Upvotes: 0

Patrick Lynch
Patrick Lynch

Reputation: 2782

In your viewDidLoad method, add this:

self.edgesForExtendedLayout = UIRectEdgeBottom

Upvotes: 0

Related Questions