Zia
Zia

Reputation: 14722

UITableViewCell Separator not Appearing

I have a UITableView in a custom VC which is pushed onto a custom navigation controller stack. The custom navigation controller has the following code:

- (void)viewWillLayoutSubviews{

    [super viewWillLayoutSubviews];
    self.view.superview.bounds = CGRectMake(0, 0,335, 657);
}

The problem is, the separator lines between the cells do not appear. If I remove the bounds line, then they appear. Can I change the bounds and also have the separators show?

Calling viewWillLayoutSubviews after changing bounds is no help either.

Upvotes: 0

Views: 79

Answers (2)

Zia
Zia

Reputation: 14722

Okay, so apparently this only happens on the simulator. Device is fine.

Upvotes: 0

Austin
Austin

Reputation: 5655

If I understand correctly, you are setting the bounds of the navigation controller's view, which you should never do. I suggest refactoring in a way that allows the navigation controller to manage its own view and the frame of its child view controllers' views.

Upvotes: 1

Related Questions