I got a scene with a UIDraggable panel which I'm using to scroll through a series of full-screen elements (I'll call them "pages" here). Each page has a background sprite, scaled with a UIStretch to be as big as the screen, and then the other widgets are anchored to points relative to this background sprite. So far so good, except I'm trying to run this on a range of devices and resolutions, including iOS. The UIStretch manages to change the scale of the background sprite for the page and the anchors reposition everything correctly, but nothing causes the BoxColliders to recalculate. Obviously when going from an arbitrarily-sized window in the Editor to, say, an iPad 3 or 4, the effect can be pretty severe. You have to hunt around the screen for the area which is still covered by the un-resized collider in order to get things to scroll.
So, questions:
What's the generally-accepted way to make a collider recalculate after a UIStretch has resized its child element(s)? I guess you'd call NGUITools.AddWidgetCollider, but where and when do you call it? Is there a way of knowing (some kind of callback?) when a UIStretch has caused an element to resize? Or do I have to create a custom component that just resizes the collider every Update? If so, isn't that crazily inefficient? Why doesn't UIStretch already contain the functionality to optionally rescale colliders in the parent object? It seems like a pretty significant oversight that it doesn't, because it means you can never stretch an item which you want to be touchable and have it work properly.