So I have a completely dynamic UI. Must work on various sized devices (Android). To do that, I am often using anchors and stretches because they can function on relative space.
However, with tables the padding is in pixels instead of something relative so I've needed to write some code to step into the table at runtime and tweak things based on the device surface (after initialization, change padding sizes based on screen size and item size, which is also dynamic). So far so good. The issue comes whenever I try to do something very soon after the table gets enabled.
CenterOnChild for example. It's always a little "off". I noticed that if I just let it center itself twice, it would fix the error. Then I realized what's happening is that the padding updates just weren't quite finished. To fix this, all I've found so far is that I can delay the CenterOnChild for 0.2 seconds, then everything is fine. But that's so hacky and you can see the pause. I've tried narrowing in on the delay, but I worry I'll get timing issues on different devices. I wish I had some way of knowing precisely when I can call CenterOnChild, or if relative padding was built into the UITable.
Another solution I've thought of is silently enabling all the UI at once so these padding updates and various other fixes can "take" to the dynamic UI before I need to really display it (and before it needs to move correctly). That also feels like a hack though so I figure I'd post about it and see what others think.
ps: My feature request: Everything in NGUI that has a pixel setting, should also have a relative method of setting the same thing, and vice versa.