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:

app running. see space?

there should no space between table view cells , buttons.

i not know how fix this. uitableview embedded in containerview this:

storyboard view controller

i think got container view constraints right. top space chapter button set 0.

container view constraints

i tried change settings of table view controller in storyboard. example adjust scroll view insets. not change when disable that.

tableviewcontroller settings

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:

adjust scroll view insets

or via code in viewdidload(): self.automaticallyadjustsscrollviewinsets = false


Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

How to get the ip address of VM and use it to configure SSH connection dynamically in Ansible -

javascript - Get parameter of GET request -