久久久久久久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í)的歡迎消息)
主站蜘蛛池模板: 久久黄网 | 亚洲精品一区二区三区中文字幕 | 一区二区三区在线播放 | 亚洲国产精品自拍 | 日韩中文字幕 | 国产高清在线观看 | 久久亚洲91 | 一区二区三区国产 | 国产日韩欧美在线观看 | 在线免费av电影 | 久久久av| 自拍偷拍小视频 | 中文字幕亚洲一区二区三区 | 色呦呦在线 | 亚洲欧美国产一区二区三区 | 国产精品久久 | 亚洲欧美一区二区三区国产精品 | 91在线精品视频 | 99精品一区二区三区 | 99热在线播放 | 综合欧美亚洲 | 91视频播放| 久久综合久久久 | 中文欧美日韩 | 精品国产乱码久久久久久蜜柚 | 午夜精品一区二区三区在线观看 | 国产精品日韩高清伦字幕搜索 | 欧美一区二区三区在线观看 | 亚洲欧美视频一区 | 亚洲h在线观看 | 国产91av视频在线观看 | 黄色av网站免费看 | 久久精品一区二区视频 | 色欧美片视频在线观看 | 午夜性色a√在线视频观看9 | 久久精品国产99国产精品 | 久久久九九 | 国产又色又爽又黄又免费 | 日本在线一二 | 日韩在线不卡视频 | 亚洲视频网 |