I want to place the Table View exactly to the navigation bar

enter image description here

See the dotted section for additional space displayed between the navigation bar and the table view.

I tried 3 things but the same problem.
1. Reset all constraints and “Add missing constraints”
2. I used pin and keep the '0' distance to the UI object above the table view
3. I used the drag and drop method and set the vertical distance to represent the table.

+3
source share
6 answers

attribute inspector Adjust Scroll View Insets, storyboard, .

enter image description here

Edit:

. , , .

true, , , , , , , . false, .

+2

" " " ". "".

Customize scrolling Show inserts

+2

, , , . .

0

viewDidLoad tableview,

self.tableView.contentInset = UIEdgeInsetsMake(0, 0, 0, 0);

.

.

0
-(void)viewDidLoad{
    [super viewDidLoad:animated];
    self.automaticallyAdjustsScrollViewInsets = NO;
}
0

viewDidLoad,

self.navigationController?.navigationBar.translucent = false
0
source

Source: https://habr.com/ru/post/1656309/


All Articles