[PhoneGap] orientationchange event does not fire in ios(v1.6.0)

88 visningar
Hoppa till det första olästa meddelandet

谭恒

oläst,
10 apr. 2012 13:52:492012-04-10
till phon...@googlegroups.com
Test with a simple:

document.addEventListener('orientationchange',
function(){console.log('orientationchange!')})

in deviceready.

Am i missing something or it's a bug?

Matthew N

oläst,
10 apr. 2012 13:59:122012-04-10
till phonegap
I do not know if it's a bug or not, but I use Phonegap 1.4 and it does
not fire for me either.

Instead I am using the orientation detection from JQuery Mobile 1.1
rc1.

Shazron

oläst,
10 apr. 2012 14:03:092012-04-10
till phon...@googlegroups.com
Just re-tested it again, it works. By default a new app only supports
portrait, you have to enable the other orientations. Click on your
project icon, then Summary.

> --
> You received this message because you are subscribed to the Google
> Groups "phonegap" group.
> To post to this group, send email to phon...@googlegroups.com
> To unsubscribe from this group, send email to
> phonegap+u...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/phonegap?hl=en?hl=en
>
> For more info on PhoneGap or to download the code go to www.phonegap.com

谭恒

oläst,
10 apr. 2012 15:09:042012-04-10
till phon...@googlegroups.com
I did enabled all the orientations.And when i rotate the simulator,
the screen rotate correctly, but orientationchange event just not
fire.

That's happen to iphone 4.3 simulator, but when i change to 5.0/5.1
simulator, orientationchange did get fired.

I am not good at ios develop, am i missing something? And I use xcode 4.3.

Sorry for poor english.

2012/4/11 Shazron <sha...@gmail.com>:

谭恒

oläst,
13 apr. 2012 08:35:472012-04-13
till phon...@googlegroups.com
Checked again and still can't get orientationchange event fired in
iphone 4.3 simulator.
I notice that in CDVViewController.m, in fuction
didRotateFromInterfaceOrientation, these is a " TODO: update JS
references here". Unfinished code?

Shazron

oläst,
13 apr. 2012 11:04:242012-04-13
till phon...@googlegroups.com

谭恒

oläst,
13 apr. 2012 14:50:542012-04-13
till phon...@googlegroups.com
I have corrected that line to lower-case, recompile, and
orientationchange event still not being fired in ios4.3.
Missing some steps?
Svara alla
Svara författaren
Vidarebefordra
0 nya meddelanden