动态添加/删除地区布局

编程入门 行业动态 更新时间:2024-10-23 02:04:21
本文介绍了动态添加/删除地区布局的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

是否可以动态地添加和删除地区与木偶的布局?我的应用程序需要能够从布局推动和流行地区。当你在一个项目的源$ C ​​$ C钻取这类似于GitHub上如何推动和持久性有机污染物的看法。他们对动画的幻灯片时presenting下一个视图,然后将其滑回,当你打了退堂鼓。这个想法是,我需要保持周围的previous意见。另一个比喻是UINavigationControllers iOS上是如何工作的。

Is it possible to dynamically add and remove regions to a layout with Marionette? My app needs to be able to push and pop regions from a layout. This is similar to how GitHub pushes and pops views when you drill down in the source code of a project. They have the slide over animation when presenting the next view and then it slides back when you're backing out. The idea is that I need to keep the previous views around. Another analogy would be how UINavigationControllers work on iOS.

或者,也许我应该只是定义了一个自定义布局,能够处理动态添加和删除地区?

Or maybe I should just define a custom layout that is able to handle adding and removing regions on the fly?

推荐答案

我最终实现一个容器,以适合我的需要。像你的木偶期望它清理事件裁判。

I ended up implementing a container view to fit my needs. It cleans up event refs like you'd expect in Marionette.

github/ayoung/backbone-vs-marionette/blob/marionette/public/js/views/mainContainer.js

更多推荐

动态添加/删除地区布局

本文发布于:2023-11-11 18:08:40,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1579188.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:布局   地区   动态

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!