How to define dynamically the title in a Navigatio

2019-08-17 18:39发布

I'm using the component of SenchaTouch NavigationView. The problem I have is I can not define the title of my view dynamically. This is the code I'm using

onMyList: function(dataview, index, target, record, e, options) {
    var myScreen = this.getMyScreen();
    var model = Ext.getStore('Example').getAt(index);
    dataview.up('navSample').config.title = model.data.Nombre;
    dataview.up('navSample').push(myScreen);
},

1条回答
Ridiculous、
2楼-- · 2019-08-17 19:21

First you have to upgrade Sencha Touch to at least 2.0.1. than you could use:

var navbar = navigationView.getNavigationBar();

navbar.setTitle('My cool title');

Cheers, Oleg

查看更多
登录 后发表回答