久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

Sencha Touch Ext.navigation.View pop to root

Sencha Touch Ext.navigation.View pop to root(Sencha Touch Ext.navigation.View pop to root)
本文介紹了Sencha Touch Ext.navigation.View pop to root的處理方法,對大家解決問題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

問題描述

我有一個(gè) Ext.navigation.View,我在其中推送了一些視圖.某些用戶交互要求我直接返回導(dǎo)航視圖的頂層——相當(dāng)于 iOS 中 UINavigationController 上的 popToRootViewControllerAnimated:.

I have an Ext.navigation.View in which I have pushed a few views. Certain user interactions require that I go directly back to the top level of the navigation view -- the equivalent of popToRootViewControllerAnimated: on a UINavigationController in iOS.

我嘗試過各種方法,例如:

I have tried various things like:

while(navigationView.getItems().getCount() > 1)
    navigationView.pop();

while(navigationView.canPop())
    navigationView.pop();

都不行.第一個(gè)例子似乎讓我陷入了無限循環(huán),這并不奇怪.第二個(gè)例子似乎只彈出一個(gè)視圖.

Neither work. The first example seems to put me into an infinite loop which isn't too surprising. The second example only seems to pop one view off.

所以問題是:在 Sencha Touch(版本 2 開發(fā)者預(yù)覽版)中的 Ext.navigation.View 中彈出到根視圖的正確方法是什么?

So the question: What is the proper way to pop to the root view in an Ext.navigation.View in Sencha Touch (version 2 developer preview)?

推薦答案

有許多臨時(shí)方法可以實(shí)現(xiàn)這一目標(biāo).

There has been a number of interim methods for achieving this.

我使用的是彈出一個(gè)比你曾經(jīng)擁有的級(jí)別數(shù)更高的數(shù)字,例如

The one I was using was to pop a number higher than the number of levels you would ever have e.g.

navigationView.pop(10);

效果很好,但我對此并不滿意,但我看到他們現(xiàn)在引入了一種重置方法.你可以這樣稱呼它......

and that worked fine, but I was never happy with that, but I see they have now introduced a reset method. Which you can call thus...

navigationView.reset();

在 Sencha 源代碼內(nèi)部(見下文),您可以看到它與 @Mithralas 所說的工作類似,但更容易編寫.

Internally within the Sencha source code (see below) you can see that it does a similar job to what @Mithralas said, but just easier to write.

// From the Sencha source code
this.pop(this.getInnerItems().length);

這篇關(guān)于Sencha Touch Ext.navigation.View pop to root的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

【網(wǎng)站聲明】本站部分內(nèi)容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請聯(lián)系我們刪除處理,感謝您的支持!

相關(guān)文檔推薦

discord.js v12: How do I await for messages in a DM channel?(discord.js v12:我如何等待 DM 頻道中的消息?)
how to make my bot mention the person who gave that bot command(如何讓我的機(jī)器人提及發(fā)出該機(jī)器人命令的人)
How to fix Must use import to load ES Module discord.js(如何修復(fù)必須使用導(dǎo)入來加載 ES 模塊 discord.js)
How to list all members from a specific server?(如何列出來自特定服務(wù)器的所有成員?)
Discord bot: Fix ‘FFMPEG not found’(Discord bot:修復(fù)“找不到 FFMPEG)
Welcome message when joining discord Server using discord.js(使用 discord.js 加入 discord 服務(wù)器時(shí)的歡迎消息)
主站蜘蛛池模板: 日韩精品一区二区三区视频播放 | 超级乱淫av片免费播放 | 99精品在线观看 | 国产黄色网 | 午夜男人免费视频 | 久久亚洲精品国产精品紫薇 | 国产精品亚洲片在线播放 | aaa综合国产 | 欧美日韩高清免费 | 在线中文字幕视频 | 欧美激情一区二区三区 | 播放一级毛片 | 一区二区三区精品在线视频 | 亚洲在线中文字幕 | 一区二区三区在线播放视频 | 色综合久久伊人 | 欧美成视频 | 91亚洲国产成人久久精品网站 | 亚洲精品av在线 | 亚洲国产中文字幕 | 香蕉一区二区 | 在线观看中文字幕一区二区 | 日本一区二区影视 | 九色av| 免费精品一区 | 亚洲在线| 亚洲国产精品日韩av不卡在线 | 国产午夜精品视频 | 国产欧美一区二区在线观看 | 一级黄色在线 | 国产99久久久国产精品 | 国产精品久久久久一区二区三区 | 欧美精品video | 亚洲高清在线观看 | 噜噜噜色网 | 久久久久久国产精品mv | 欧美福利久久 | 91久久久久久久久久久 | 一级毛片高清 | 免费特级黄毛片 | 国产精品国产三级国产aⅴ原创 |