简体   繁体   中英

How to accomplish a optional childview?

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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM