PDA

View Full Version : Strange issue with iOS5 and PhoneGap 1.2.0



trueinsider
7 Dec 2011, 9:04 PM
Hi.

When I run this app on iOS 5 device/simulator logo is not showing. There is no such problem on iOS 4.3 device/simulator. I dont know why this happens. Even if I'll delete PhoneGap and run this in Mobile Safari on iOS 5 logo will not show for first time. But if I refresh page then logo appears.

There is my app.

index.html:

<!DOCTYPE html><html>
<head>
<script type="text/javascript" charset="utf-8" src="sencha-touch-debug-w-comments.js"></script>
<link href="resources/css/sencha-touch.css" rel="stylesheet" type="text/css" />

<script type="text/javascript" charset="utf-8" src="app.js"></script>

<script type="text/javascript" charset="utf-8" src="phonegap-1.2.0.js"></script>
<script type="text/javascript">
document.addEventListener("deviceready", app.mainLaunch, false);
</script>
</head>
<body></body>
</html>

app.js:

Ext.regApplication({
name: 'app',
launch: function() {
this.launched = true;
this.mainLaunch();
},
mainLaunch: function() {
if (/*!device || */!this.launched) {return;}
this.views.viewport = new Ext.Panel({
fullscreen: true,
layout: 'card',
cardSwitchAnimation: {
type: 'slide',
direction: 'up'
},
initComponent: function() {
Ext.apply(app.views, {
main: new Ext.Panel({
id: 'main',
layout: 'fit',
items: [
{
id: 'logo',
xtype: 'panel',
html: '<img src="logo.png" />',
},
],
}),
});
Ext.apply(this, {
items: [
app.views.main,
]
});
app.views.Viewport.superclass.initComponent.apply(this, arguments);
}
});
}
});

trueinsider
8 Dec 2011, 5:41 AM
Another interesting behavior. If i'll set
#logo {
z-index: 0;
}Then logo will show. But I still dont know why.