我需要在sencha touch內部允許一些網站預覽。我看到兩種不同的可能性:sencha touch ::如何在iFrame內部爲網站預覽創建面板
- 開口safariMobile-應用顯示的鏈接
- 生成與所述「由HTML屬性內的iFrame的面板。
,因爲我不知道該如何實現1.我開始與2,但遇到一些麻煩:
一)我不iFrameis滾動的內容。如果我嘗試滾動內容,則整個視口會滾動,包括我的底部TabPanel按鈕!
B)所顯示的網站似乎沒有任何CSS或圖片
這裏載入是我previewPanel代碼:
app.views.WebsitePreview = Ext.extend(Ext.Panel, {
layout: 'card',
scroll: 'vertical',
styleHtmlContent: true,
fullscreen: true,
initComponent: function(){
this.html = '<iframe width="100%" height="100%" src="'+ this.theLink + '"></iframe>',
var toolbarBase = {
xtype: 'toolbar',
title: 'Vorschau ' //+ this.childData.childUsername,
};
if (this.prevCard !== undefined) {
toolbarBase.items = [
{
xtype: 'button',
ui: 'back',
text: 'zurück', //this.prevCard.title,
scope: this,
handler: function(){
this.baseScope.setActiveItem(this.prevCard, { type: 'slide', reverse: true });
}
}
]
};
this.dockedItems = toolbarBase;
app.views.WebsitePreview.superclass.initComponent.call(this);
}
});
Ext.reg('websitepreview', app.views.WebsitePreview);
日Thnx您的幫助!
它確實滾動,但向下滾動時,視口中的iframe內容無法呈現。 – virsir 2012-03-06 12:34:59
使用sencha touch 2.0它可能已經解決了這個問題 – 2012-03-13 23:34:18
他們沒有。剛剛測試過。 – AlienWebguy 2012-05-10 20:37:23