Reputation: 12596
I am setting my UITableView frame to be just below another view on the y-axis. I do not want the UITableView to go under the view higher on the y axis, like it would a UINavigationBar. In this image the scroll indicators are at the very top.
But As you can see the inset is not at the top of the tableview. I am assuming that this is because the UITableView is normally used at the top of a UINavigationBar and the scrollview insets are adjusted accordingly, but I don't want that. I've tried setting the following to to UIEdgeInsetMake(0,0,0,0), but it does nothing.
tableView.scrollIndicatorInsets
tableView.contentInset
tableView.contentOffset (to CGPointMake(0,0))
I remember seeing something in iOS 7 tech talks about this, but I've searched through them for the past little bit and haven't found it.
Thanks!!
tableView = [[UITableView alloc] initWithFrame:CGRectMake(0, 0, 0, 0) style:UITableViewStyleGrouped];
tableView.translatesAutoresizingMaskIntoConstraints = NO;
tableView.delegate = self;
tableView.dataSource = self;
@"V:|-(NavBarHeight)-[otherView]-(0)-[tableView]-(0)-|"
Upvotes: 1
Views: 459
Reputation: 2464
Could you try to uncheck the properties of the viewcontroller mentioned in the Screenshot according to your need. I hope this might help you,
Upvotes: 3