ios - How to remove UITableView top inset when embedded in ContainerView? -
i working on iphone app. have problem top spacing inset of uitableview. see screenshot:
there should no space between table view cells , buttons.
i not know how fix this. uitableview embedded in containerview this:
i think got container view constraints right. top space chapter button set 0
.
i tried change settings of table view controller in storyboard. example adjust scroll view insets
. not change when disable that.
i tried set tableview insets directly in code in viewdidload()
:
tableview.contentinset = uiedgeinsets(top: 0, left: 0, bottom: 0, right: 0)
however did not fix it.
can help? have no idea look.
this can solved disabling auto adjustment of scroll view insets. setting has applied viewcontroller which contains containerview (with uitableview inside of it). not work when applied uitableview itself.
this can done via storyboard:
or via code in viewdidload()
: self.automaticallyadjustsscrollviewinsets = false
Comments
Post a Comment