我希望将导航控制器和选项卡栏控制器组合在一起,并通过选项卡栏显示3个视图控制器。
如果我将三个vcs中的每一个都嵌入到它自己的导航控制器中,然后将它们添加到选项卡栏控制器中,我就可以做到这一点。但是,现在有三个导航控制器。
但是根据苹果的文档,可以使用单一的导航控制器:
To create a combined interface with three tabs that contain custom view controllers and one tab that contains a navigation controller:
1) Create three custom view
我使用Router中的函数动态加载从模板创建的页面(如某些教程中所示):
changePage: function(page) { // page is a View object
$(page.el).attr('data-role', 'page');
page.render();
$('body').append($(page.el));
var transition = $.mobile.defaultPageTransition;
if (this.