久久久久久久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的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

問題描述

我有一個 Ext.navigation.View,我在其中推送了一些視圖.某些用戶交互要求我直接返回導航視圖的頂層——相當于 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();

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

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 開發者預覽版)中的 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)?

推薦答案

有許多臨時方法可以實現這一目標.

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

我使用的是彈出一個比你曾經擁有的級別數更高的數字,例如

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);

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

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 源代碼內部(見下文),您可以看到它與 @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);

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

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

相關文檔推薦

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(如何讓我的機器人提及發出該機器人命令的人)
How to fix Must use import to load ES Module discord.js(如何修復必須使用導入來加載 ES 模塊 discord.js)
How to list all members from a specific server?(如何列出來自特定服務器的所有成員?)
Discord bot: Fix ‘FFMPEG not found’(Discord bot:修復“找不到 FFMPEG)
Welcome message when joining discord Server using discord.js(使用 discord.js 加入 discord 服務器時的歡迎消息)
主站蜘蛛池模板: 欧美另类视频 | 日韩美av| 亚洲网站免费看 | 国产精品一区二区av | 久久久免费观看视频 | 一二三区在线 | 免费a大片 | 国产精品久久久久无码av | 自拍偷拍亚洲视频 | 青青久草| 奇米av| 91原创视频 | 狠狠的干 | av黄色在线 | 一区二区久久精品 | 亚洲女人天堂成人av在线 | 玖玖久久 | 一本大道久久a久久精二百 国产成人免费在线 | 国产精品精品视频一区二区三区 | 手机av在线| 亚洲人a| 成人午夜激情 | 91传媒在线观看 | 极品在线 | 免费观看黄a一级视频 | 婷婷久久久久 | 理伦毛片 | 福利影院在线看 | 蜜月va乱码一区二区三区 | 亚洲三级av | 三级在线免费观看 | 亚洲一区二区三区视频 | 日本久久久影视 | 美女一区二区在线观看 | 91视频播放 | 嫩草懂你的影院入口 | 懂色tv| 一区二区三区国产好 | 日韩在线小视频 | 成人啊啊啊 | 久久视频精品 |