TableView Alignment in Screen

Screenshot 2023-04-21 at 12.34.48

How can I reduce this area on the grey circle ?

I can scroll my tableview when there is a few more rows but if there’s only one row I have this result

Change the Top layout constraint to TopLayoutGuide.Top

I have a label on the top of the screen and a button on the bottom

Here are my constraints for my tableview

This what I have now

This what I want

I can have what I want by dragging the tableview with my mouse.

That looks like the space that you get with large titles. Make sure they’re not set to Large or Automatic maybe?

Thanks @Greg_O

Large title is set to never

Do you have any constraints on the label that might be affecting this?

My label constraints:

What if you set the Top constraint to TitleLabel.Bottom + StandardGap ?

1 Like

It changes nothing. To go further I add this code to the open event in screen:


Here what it produces:

The problem seems to be the position of the cell in the table view

You certainly have some code that changes the content insets of the table or a few empty sections above the first cell.

I have only 1 section without title.

I try put a title in the section

I don’t know what’s the content insets :thinking:

I add this line on screen opening

// Remove navigation bar
Self.HasNavigationBar = False

And got the result I expected

I don’t know why I have to wrote this code because my Navigation is already set to not visible in the IDE, maybe it’s a bug ?

I also use @Jeremie_L tips for contraints (Change the Top layout constraint to TopLayoutGuide.Top)

Thank @Jeremie_L and @Greg_O for helping me to solve this problem

1 Like