Skip to content

Instantly share code, notes, and snippets.

@davidnorth
Created August 11, 2011 17:24
Show Gist options
  • Save davidnorth/1140234 to your computer and use it in GitHub Desktop.
Save davidnorth/1140234 to your computer and use it in GitHub Desktop.
// subclass ContainerView which has an array observer on childViews
MyApp.MyContainerView = SC.ContainerView.extend({
})
// Then in controller, or state chart maybe:
var newView = SC.TextField.create()
containerViewInstance.get('childViews').pushObject(newView);
@davidnorth
Copy link
Author

Also
('childViews').firstObject().destroy() or remove() to clear a view

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment