I have a TableView
inside a ViewController
.
I made the TableView
stretch to the View SuperMargings (with constraints) and disabled all SafeArea
Inset options but my TableView
is still under the SafeArea
when I run my project.
How can I make my TableView
go full height on iPhones with notch?
If you have already pinned
tableView
to it's superview(not tosafeArea
) with constraints buttableView
still respectssafeArea
there is propertycontentInsetAdjustmentBehavior
inUIScrollView
(UITableView
is subclass ofUIScrollView
as we know) since iOS 11.This property is
UIScrollView.ContentInsetAdjustmentBehavior
enum with 4 options. You need to set.never
tocontentInsetAdjustmentBehavior
.