How to accomplish a optional childview?

46 Views Asked by At

I have a view with two child views, and want the second view optionally to disappear, that is disabled including the dataBinding, and resize the first view, and vice versa. I need some hints or (pseudo) code how to accomplish this. Thx in advance.

1

There are 1 best solutions below

3
On BEST ANSWER

There are quite a few views in SproutCore which do this in some way or another. While it is not the best example, have a look at the experimental select search view.

You are going to need to override createChildViews to set up the bindings manually, so you can also take them down when required.