Relationship between the width of an iOSCustomTableCell and an iOSTable

  1. last week

    Jason T

    Feb 16 Pre-Release Testers, Xojo Pro Sydney, Australia
    Edited last week by Jason T

    I've got a bunch of iOSCustomTableCells in use. There's no sizing values available for these so at first I just copied one to the next to keep them all about the same width (though the height varies). This "just seems to work" when they're added to an iOSTable; i.e. they just seem to fit.

    But what I've now noticed is that there seems to be some sort of resizing going on. If an iOSCustomTableCell "real estate" is a bit tight for space, and I drag it out to make it wider, it still fits in the iOSTable as before but the controls are now a different size (e.g. iOSTextFields are wider than before). The margins are still the same due to auto-layout. So on the one hand this seems completely right as I'm using auto-layout to anchor the controls, so they should resize. But are they re-sizing or is the scale somehow changing?

    What I'd like to know is: what is the correct size to make an iOSCustomTableCell so that you can predict how it's going to fit inside an iOSTable? Now that I've resized some of my iOSCustomTableCells and I've got more room to play with, what's the limit on this resizing? Should I be doing this at all?

    This is difficult to explain and probably difficult to answer unless you've done a bit of work with iOSCustomTableCells to roll your own customised iOSTable and then perhaps this will make some sense? If it does, please tell me what you do! :)

  2. Antonio R

    Feb 16 Pre-Release Testers, Xojo Pro Europe (Italy)

    The cell are resized thru auto layout, they are not scaled.

    You can't predict clearly how the will resized since it depends on the iOSTable resizing.
    Usually you have the table as wide as the screen/view, but this is not true in any case you can set the table with a fixed width (for any rotation and for any view size)

    Keep in mind that the cell width si dynamic (the cell will be wide as the table) and cell height is the resulting row height.

  3. 7 days ago

    Jason T

    Feb 17 Pre-Release Testers, Xojo Pro Sydney, Australia

    Thank you Antonio. It's good to know there's no scaling at play. But I think there might be an issue with the way the auto-layout of the cell "connects to" or is related to the auto-layout of the table. Or maybe it's just me. I'll persevere. :)

  4. 2 days ago

    Jérémie L

    Feb 21 Pre-Release Testers, Xojo Pro Europe (France)

    @Antonio R and cell height is the resulting row height.

    Antonio I don't completely agree on this.

    The Custom row height is the smallest value of Table.EstimatedRowHeight and the height of the CustomCell in Xojo layout editor.
    This makes it incredibly difficult in Xojo to set the correct row height when the table has several different custom cells.

or Sign Up to reply!