I’m trying to work with constraints in my iOS layout. There’s an iOSMobileTable on the screen, along with a standard toolbar at the bottom.
Currently, the toolbar covers the table. The table’s bottom constraint reads “bottom=Parent.Bottom-StandardGap”. There’s no “Toolbar” entry in the “Relative to” field, so it looks like it’s not possible to automatically take the toolbar height into account.
I’m guessing the only way is to put a fixed offset of the height of the toolbar, but I don’t know how high a MobileToolBar is, and this information doesn’t seem to be accessible programatically.
Did you try setting:
Table.Bottom = BottomLayoutGuide.Top-StandardGap ?
The bottomLayoutGuide property comes into play when a view controller is frontmost onscreen. It indicates the lowest vertical extent for content that you don’t want to appear behind a translucent or transparent UIKit bar (such as a tab bar or toolbar).
On a side note, it is usually expected for tables to scroll all the way underneath the Toolbar. The toolbar will slightly change colour when the table is completely scrolled.
Thanks for the explanation. I’m feeling the name doesn’t sound explicit to me.
I appreciate your hint.
In my case, it makes things confusing that way, because the table shows rows with a custom button at left; when the table is underneath the toolbar, the user wouldn’t know if pressing there would trigger the button of the row or of the toolbar, hence why I was trying to change that.